1
0
Fork 0
mirror of https://github.com/hcartiaux/dotfiles.git synced 2024-10-18 17:25:23 +02:00

[vim] Useful mappings

This commit is contained in:
Hyacinthe Cartiaux 2016-11-17 10:55:44 +01:00
parent 5c326bb55e
commit c7073b80f7

View file

@ -261,6 +261,14 @@ let g:netrw_banner = 0
map <F4> <Esc>:set paste<CR> map <F4> <Esc>:set paste<CR>
"" Split
noremap <Leader>h :<C-u>split<CR>
noremap <Leader>v :<C-u>vsplit<CR>
"" Tabs
nnoremap <Tab> gt
nnoremap <S-Tab> gT
nnoremap <silent> <S-t> :tabnew<CR>
map <F3> <Esc>:tabnext<CR> map <F3> <Esc>:tabnext<CR>
map <F2> <Esc>:tabprevious<CR> map <F2> <Esc>:tabprevious<CR>
@ -269,3 +277,26 @@ if has('unnamedplus')
set clipboard=unnamed,unnamedplus set clipboard=unnamed,unnamedplus
endif endif
noremap YY "+y<CR>
noremap <leader>p "+gP<CR>
noremap XX "+x<CR>
"" Buffer nav
noremap <leader>q :bp<CR>
noremap <leader>s :bn<CR>
"" Close buffer
noremap <leader>c :bd<CR>
"" Clean search (highlight)
nnoremap <silent> <leader><space> :noh<cr>
"" Vmap for maintain Visual Mode after shifting > and <
vmap < <gv
vmap > >gv
"" Move visual block
vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '<-2<CR>gv=gv