From b75cc61079085291e5eb66ee1bcd04d5253f7857 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 29 Nov 2016 11:41:29 -0600 Subject: [PATCH] add some fancier ways to switch between buffers in vim --- editor/nvim/config/init.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editor/nvim/config/init.vim b/editor/nvim/config/init.vim index 89df43a..b0bb1c5 100644 --- a/editor/nvim/config/init.vim +++ b/editor/nvim/config/init.vim @@ -228,7 +228,7 @@ nnoremap mz :DistractionFreeMode :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 :GitFiles +" super fancy buffer switching +nnoremap l :ls:b +nnoremap h :b# + " use leader j and k to switch buffers as well nnoremap k :bnext nnoremap j :bprevious