cindentLast set from /usr/share/vim/vim71/indent/c.vim
这也适用于地图和亮点。(感谢joeytwiddle指出这一点。)例如:
:verbose nmap Un U <C-R>Last set from ~/.vimrc
:verbose highlight NormalNormal xxx guifg=#dddddd guibg=#111111 font=Inconsolata Medium 14Last set from ~/src/vim-holodark/colors/holodark.vim
==========================================================In normal mode==========================================================gf ................ open file under cursor in same window --> see :h pathCtrl-w f .......... open file under cursor in new windowCtrl-w q .......... close current windowCtrl-w 6 .......... open alternate file --> see :h #gi ................ init insert mode in last insertion position'0 ................ place the cursor where it was when the file was last edited
"Usage: in normal mode, where you want the prototypes to be pasted:":call GenerateProptotypes()function GeneratePrototypes()execute "silent !ctags --fields=+KS ".expand("%")redraw!let list = taglist('.*')let line = line(".")for item in listif item.kind == "function" && item.name != "main"let name = item.namelet retType = item.cmdlet retType = substitute( retType, '^/\^\s*','','' )let retType = substitute( retType, '\s*'.name.'.*', '', '' )
if has_key( item, 'signature' )let sig = item.signaturelet sig = substitute( sig, '\s*\w\+\s*,', ',', 'g')let sig = substitute( sig, '\s*\w\+\(\s)\)', '\1', '' )elselet sig = '()'endiflet proto = retType . "\t" . name . sig . ';'call append( line, proto )let line = line + 1endifendforendfunction
function GeneratePrototypesFullSignature()"execute "silent !ctags --fields=+KS ".expand("%")let dir = expand("%:p:h");execute "silent !ctags --fields=+KSi --extra=+q".dir."/* "redraw!let list = taglist('.*')let line = line(".")for item in listif item.kind == "function" && item.name != "main"let name = item.namelet retType = item.cmdlet retType = substitute( retType, '^/\^\s*','','' )let retType = substitute( retType, '\s*'.name.'.*', '', '' )
if has_key( item, 'signature' )let sig = item.signatureelselet sig = '(void)'endiflet proto = retType . "\t" . name . sig . ';'call append( line, proto )let line = line + 1endifendforendfunction
" Pasting in normal mode should append to the right of cursornmap <C-V> a<C-V><ESC>" Savingimap <C-S> <C-o>:up<CR>nmap <C-S> :up<CR>" Insert mode control deleteimap <C-Backspace> <C-W>imap <C-Delete> <C-O>dwnmap <Leader>o o<ESC>knmap <Leader>O O<ESC>j" tired of my typonmap :W :w