vim

vim

Plugins

Default Binds

BindDescription
gfGoto file. Start editing the file under the cursor.
gFStart editing the file under the cursor and jump to the line number following the filename.
gdGoto definition.
gaPrint ASCII value of character under the cursor.
]pPaste line matching indent of current line.
-afAction around function (e.g. daf is delete around function)
-asAction around sentence.

Custom Binds

" Semicolon in normal mode is the same as colon
nnoremap ; :

" Escape key also mapped as pushing j and k
inoremap jk <Esc>
inoremap kj <Esc>
autocmd InsertEnter * set timeoutlen=75
autocmd InsertLeave * set timeoutlen=1000

" Split moving
set splitbelow
set splitright
nnoremap <C-L> <C-W>w
nnoremap <C-H> <C-W>W

" Tab moving
nnoremap <C-J> :tabnext<CR>
nnoremap <C-K> :tabprev<CR>

" Format
nnoremap <C-O> !!fmt<CR>

" Goto file will open in new tab
map gf <C-W>gF