Ctrl+X Ctrl+F = insert filename in current dir
C^+N = autocomplite word
C^r+" or C^r+
C^x+C^l = autocomplite line
~/.vimrc
set number
set expandtab
set textwidth=79
set tabstop=8
set softtabstop=4
set shiftwidth=4
set autoindent
syntax on
http://stackoverflow.com/questions/164847/what-is-in-your-vimrc
:%s/fred/joe/igc : general substitute command
:%s/\r//g : delete DOS Carriage Returns (^M)
:'a,'bg/fred/s/dick/joe/gc : VERY USEFUL
:s/\(.*\):\(.*\)/\2 : \1/ : reverse fields separated by :
# non-greedy matching \{-}
:%s/^.\{-}pdf/new.pdf/ : to first pdf)
:s/fred/
CTRL-R CTRL-W : pull word under the cursor into a command line or search
:help /\{-}
# multiple commands
:%s/\f\+\.gif\>/\r&\r/g | v/\.gif$/d | %s/gif/jpg/
:%s/suck\|buck/loopy/gc : ORing
:s/__date__/\=strftime("%c")/ : insert datestring
Комментариев нет:
Отправить комментарий