" vim map setting " Treat long lines as break lines (useful when moving around in them) map j gj map k gk nnoremap j gj nnoremap k gk " fast saving nmap w :w! " use tab as % nmap % vmap % " smart way to move between windows map j map k map h map l " Useful mappings for managin tabs map tn :tabnew map to :tabonly map tc :tabclose " Disable arrowkeys noremap noremap noremap noremap " visual mode copy and paste to system clipboard "vmap "+y "vmap "+c "vmap "+p " 将VIM中将内容复制到系统粘贴板,或者从系统粘贴板粘贴到VIM nnoremap "+y vnoremap "+y vnoremap "+gP nnoremap "+gP " 快速移动当前行 nnoremap :m .+1== nnoremap :m .-2== inoremap :m .+1==gi inoremap :m .-2==gi vnoremap :m '>+1gv=gv vnoremap :m '<-2gv=gv " 空格关闭高亮,清空所有已经显示 nnoremap :set hlsearch! hlsearch? function! Xml() set filetype=xml :%s/>\r<替换成>回车< :normal gg=G endfunction map xml :call Xml() " plugin map setting " Normal mode F2 to call NERDTree nmap :NERDTreeToggle