Skip to content

Instantly share code, notes, and snippets.

@pau-riosa
Created December 20, 2021 11:37
Show Gist options
  • Save pau-riosa/b195ae43d6d855750ee5654ca77c7f55 to your computer and use it in GitHub Desktop.
Save pau-riosa/b195ae43d6d855750ee5654ca77c7f55 to your computer and use it in GitHub Desktop.
basic vim commands and shortcuts
# general
set clipboard=unnamed
set number
set incsearch
set hlsearch
# leader commands
let mapleader=" "
# navigate on insert mode
imap <C-k> <Up>
imap <C-j> <Down>
imap <C-h> <Left>
imap <C-l> <Right>
" Key commands
imap jj <Esc>
map ss :w <cr>
map qq :q <cr>
nmap <tab> <c-w>w
# easy navigate vim panes
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
# vim split pane
map <leader>ts :split <cr>
map <leader>tv :vsplit <cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment