Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigating jumplist in Vim with Tab mapped elsewhere

Tags:

vim

I've mapped the <Tab> key to switch buffers. However, as <Tab> is equivalent to <Ctrl-I>, I'm unable to navigate the jumplist.

Is there any way to map the jumplist navigation to some other key (say g, and g. for example) such that I can use <Tab> independently?

like image 334
kshenoy Avatar asked Mar 22 '12 01:03

kshenoy


1 Answers

Yes, just use nore when defining the maps.

nnoremap g, <C-o>
nnoremap g. <C-i>

The nore tells vim to not respect maps in the right hand side of the mapping.

like image 56
Randy Morris Avatar answered Oct 05 '22 03:10

Randy Morris