I like using space as a leader, set it to your preference.
Toggles junnegunns rainbow parentheses plugin, rarely used but occasionally needed.
Toggles spell-check highlighting, sometimes is useful when writing plaintext.
nmap <leader>w :w!<cr> nmap <leader>wq :wq!<cr>
I don't wanna have to type :w or :wq all the time to exit, I'm lazy.
nmap <A-o> o<Esc> nmap <A-O> O<Esc>
Sometimes you want a new line but not insert mode, this does this on pressing alt+o/O respectively.
Press leader q to close a buffer without closing the window it's in, works up to the last buffer.
map <silent> <leader>j :bprev<cr> map <silent> <leader>k :bnext<cr>
Rotate both directions through open buffers, obviously useful.
Hotkey to start the Tabularize command, anything after / will be what the row is aligned on.
command! -bang -nargs=? -complete=dir HFiles \ call fzf#vim#files(<q-args>, {'source': 'ag --hidden --ignore .git -g ""'}, <bang>0) map <silent> <leader>f :HFiles<cr> map <silent> <leader>F :GFiles<cr> map <silent> <leader>d :GFiles?<cr>
Fzf commands, HFiles
searches through all files and includes hidden files, this should be built in but oh well, its short enough. GFiles
goes through the active git repo, GFiles?
shows the files with diffs.
Toggles NERDTree, I think it's clear why this is useful.
map <Esc>j <A-j> map <Esc>k <A-k> nmap <M-j> mz:m+<cr>`z nmap <M-k> mz:m-2<cr>`z vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z
Move's lines up/down with alt+k/j
map <silent> <leader>mm :MinimapToggle<cr> map <silent> <leader>fm <C-w>w
Minimap toggle and minimap focus, it actually focuses the other window but I don't use windows in vim typically, so doesn't really matter to me.
map <leader>p yss<p> map <leader>a yss<a> map <leader>h1 yss<h1> map <leader>h2 yss<h2> map <leader>h3 yss<h3> map <leader>h4 yss<h4>
This adds html tags I used a lot around things