mirror of https://github.com/einverne/dotfiles.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
851 B
42 lines
851 B
" vim map setting |
|
|
|
" Treat long lines as break lines (useful when moving around in them) |
|
map j gj |
|
map k gk |
|
|
|
" fast saving |
|
nmap <leader>w :w!<cr> |
|
|
|
" smart way to move between windows |
|
map <C-j> <C-W>j |
|
map <C-k> <C-W>k |
|
map <C-h> <C-W>h |
|
map <C-l> <C-W>l |
|
|
|
" Useful mappings for managin tabs |
|
map <leader>tn :tabnew<cr> |
|
map <leader>to :tabonly<cr> |
|
map <leader>tc :tabclose<cr> |
|
|
|
" visual mode copy and paste to system clipboard |
|
"vmap <C-c> "+y |
|
"vmap <C-x> "+c |
|
"vmap <C-v> "+p |
|
|
|
" 将VIM中将内容复制到系统粘贴板,或者从系统粘贴板粘贴到VIM |
|
nnoremap <C-y> "+y |
|
vnoremap <C-y> "+y |
|
nnoremap <C-p> "+gP |
|
vnoremap <C-p> "+gP |
|
|
|
function! Xml() |
|
set filetype=xml |
|
:%s/></>\r</g "把><替换成>回车< |
|
:normal gg=G<cr> |
|
endfunction |
|
map <leader>xml :call Xml() |
|
|
|
" plugin map setting |
|
|
|
" Normal mode F2 to call NERDTree |
|
nmap <F2> :NERDTreeToggle<cr>
|
|
|