I want to make a mapping that jumps to the file of a mark but on the last visited line. Ideally I would write something like this:
nnoremap z<mark> '<mark>`"
Where z
is some command prefix and <mark>
is the mark I want to use. However I don't see any way to implement this for all marks. I could manually expand this but that is nasty.
nnoremap zA 'A`"
nnoremap zB 'B`"
nnoremap zC 'C`"
" ...
I was wondering if there is anything nicer then iterating over all marks.
Bonus points if the command can be za
and the mark is automatically upper-cased.
A'
" for? marking A and thennnoremap zA
'A works . Doesn't work for `
ma of course. Sorry formatting in comments is horrible – Steve Mar 12 '19 at 23:57