add some fancier ways to switch between buffers in vim

This commit is contained in:
Daniel Flanagan 2016-11-29 11:41:29 -06:00
parent ca82f3f0a1
commit b75cc61079
1 changed files with 5 additions and 1 deletions

View File

@ -228,7 +228,7 @@ nnoremap <silent> <Leader>mz :DistractionFreeMode<CR>
:command! ShowSpaceIndents call ShowSpaceIndentation()
:command! DistractionFreeMode call DistractionFreeModeFunc()
set hidden " hides abandoned buffers or something
set hidden " allows buffer switching without saving
set shortmess=I
set history=1000
set undofile
@ -344,6 +344,10 @@ nmap Q gqap
" launch fzf for the current git repo
nnoremap <C-P> :GitFiles<CR>
" super fancy buffer switching
nnoremap <leader>l :ls<CR>:b<space>
nnoremap <leader>h :b#<CR>
" use leader j and k to switch buffers as well
nnoremap <leader>k :bnext<CR>
nnoremap <leader>j :bprevious<CR>