9
submitted 2 years ago by DammN to c/vim

as title says :-). Time to start posting some .vimrc / .nvimrc snippets.

you are viewing a single comment's thread
view the rest of the comments
[-] dbucklin 2 points 2 years ago

One of my faves, for navigating buffers. You are using buffers, right?

nnoremap H :bp<cr> 
nnoremap L :bn<cr> 
nnoremap gb :ls<cr>:b 
nnoremap <Leader>g :e#<CR> 
nnoremap <Leader>1 :1b<CR> 
nnoremap <Leader>2 :2b<CR> 
nnoremap <Leader>3 :3b<CR> 
nnoremap <Leader>4 :4b<CR> 
nnoremap <Leader>5 :5b<CR>
nnoremap <Leader>6 :6b<CR> 
nnoremap <Leader>7 :7b<CR> 
nnoremap <Leader>8 :8b<CR> 
nnoremap <Leader>9 :9b<CR> 
nnoremap <Leader>0 :10b<CR>
[-] igemnace 1 points 2 years ago

I personally think gb there (and :b in general) has the most value from your list!

A popular (a while back, anyway) sentiment on #vim is "fly through your buffers, don't cycle!"

I myself use FZF and a custom command to fly through buffers as well

this post was submitted on 14 Jun 2023
9 points (100.0% liked)

VIM - Vi IMproved

1075 readers
1 users here now

For Vim enthusiasts and anyone interested in Vim/Neovim!

"VIM is the greatest editor since the stone chisel." - Dr. Jose Unpingco

#HJKL

founded 2 years ago
MODERATORS