ubuntu set up 5 - VIM

Edit ~/.vimrc

source vimrc:

1 :so ~/.vimrc

 

1. ctrl - left / right switching tabs

https://vim.fandom.com/wiki/Using_tab_pages

With the following mappings (which require gvim), you can press Ctrl-Left or Ctrl-Right to go to the previous or next tabs, and can press Alt-Left or Alt-Right to move the current tab to the left or right.

nnoremap <C-Left> :tabprevious<CR>
nnoremap <C-Right> :tabnext<CR>
nnoremap <silent> <A-Left> :execute 'silent! tabmove ' . (tabpagenr()-2)<CR>
nnoremap <silent> <A-Right> :execute 'silent! tabmove ' . (tabpagenr()+1)<CR>

 

Guess you like

Origin www.cnblogs.com/imoon22/p/vi.html