in vim, with
:jumps
I see the jumplist, with G
I go to the end of jumplist.
How I can go the end of list with a map ? I think in some like this
nn <leader>j :jumps<CR>G
but this, show the jumplist and go to the end of original file
The “more prompt” is not subject to mappings. From :help more-prompt
:
Note: The typed key is directly obtained from the terminal, it is not mapped and typeahead is ignored.
You can define a mapping to reset the more
option just before executing :jumps
(and restore it afterwards) like this (in your .vimrc
):
map <Leader>j :
\let prevmore=&more<Bar>
\set nomore<Bar>
\jumps<Bar>
\let &more=prevmore<CR>
When you use this \j
mapping (Leader is backslash by default, see :help mapleader
), Vim will display the whole jump list without any pauses until it gets to the end (effectively, you will see the last “page” of the output).
Note that <Leader>
, and mapleader
have nothing to do with the backslashes used above; those are line continuations for :source
d files (like .vimrc
).
setl
since more
is a global-only option. Watch out if you ever set nomore
outside of the mapping though — your double-toggle approach would then end up giving you the opposite of what you want for the jumps
command (more
set when jumps
is run).
Oct 31, 2011 at 1:45
Vim help documentation says the jump list is fixed to a maximum of 100 entries, and you can use a count with CTRL-I (prev) and CTRL-O (next) ... so the obvious way to "go to end" of the jumplist would be:
100<C-O>
This would perform what you're looking for. Put it in a mapping or whatever you desire.