tpope / vim-unimpaired

unimpaired.vim: Pairs of handy bracket mappings
https://www.vim.org/scripts/script.php?script_id=1590
3.31k stars 205 forks source link

[j and ]j for jumping between jumps #191

Open oguzbilgic opened 4 years ago

oguzbilgic commented 4 years ago

Would these mappings make sense for jumping between jumps?

nnoremap [j <C-o>
nnoremap ]j <C-i>
odnoletkov commented 4 years ago

I think it doesn’t add much value to duplicate built-in maps.

I map [j and ]j to jump to previous or next buffer from the jumplist. So it is similar to [b/]b but in MRU order which I find much more useful.

oguzbilgic commented 4 years ago

I map [j and ]j to jump to previous or next buffer from the jumplist.

I was thinking about that as well. Would you mind sharing how?

odnoletkov commented 4 years ago

https://github.com/odnoletkov/dotfiles/blob/ba319018c881527149b80e23a0278afab91af228/.vim/plugin/jumpbuffer.vim

(requires Vim 8.1)

dnaaun commented 3 years ago

Thanks @odnoletkov . @tpope , thank you for all your wonderful plugins! Any chance you'd add this specific shortcut to unimpaired? It makes total sense to me, but I'm not a vim expert, what do you think?