vim cheat

replace blank lines

1
:g/^$/d

1
:hi Normal ctermbg=black

To jump to the beginning of a C code block (while, switch, if etc), use the [{ command.

To jump to the end of a C code block (while, switch, if etc), use the ]} command.

The above two commands will work from anywhere inside the code block.

To jump to the beginning of a parenthesis use the [( command.

To jump to the end of a parenthesis use the ]) command.

current .vimrc

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
syntax on
set autoindent
colorscheme random
set backupdir=~/.vim/backups
set directory=~/.vim/swaps
set showcmd
set ignorecase
set smartcase
set cursorline
filetype on
au BufNewFile,BufRead *.pp set filetype=ruby
set tabstop=4
set shiftwidth=4
set expandtab
set paste