Is there a way to go to a global mark from a different file and make it be at the first line?
In my settings.js I have this beauty:
"vim.normalModeKeyBindingsNonRecursive": [
{ "before": ["'", "1"], "after": ["'", "1", "z", "t"] },
{ "before": ["'", "2"], "after": ["'", "2", "z", "t"] },
{ "before": ["'", "3"], "after": ["'", "3", "z", "t"] },
{ "before": ["'", "4"], "after": ["'", "4", "z", "t"] },
{ "before": ["'", "5"], "after": ["'", "5", "z", "t"] },
{ "before": ["'", "6"], "after": ["'", "6", "z", "t"] },
{ "before": ["'", "7"], "after": ["'", "7", "z", "t"] },
{ "before": ["'", "8"], "after": ["'", "8", "z", "t"] },
{ "before": ["'", "9"], "after": ["'", "9", "z", "t"] },
]
The idea is to go to the mark and then zt to go to the first line.
When on the same file, it works. But when the mark is on another file it goes to the mark at the center of the file.
Is there a way to achieve this between different files?
VSCode: v1.108.1 VSCodeVim: v1.32.4
This might solve your issue:
I made this extension that replaces the bookmark functionality in vscodevim with persistent bookmarks (maintains permanent set of bookmarks foreach workspace) that also support the following scenario:
- I have a files F1 and F2 open in editor
- I "go to mark in file F2"
- since F2 is already present in the editor it just selects the tab without changing cursor position
- if I then want to actually navigate to the specific cursor position that was set by mark in F2 I can just call the "go to mark in file F2" again while having that file focused
https://marketplace.visualstudio.com/items?itemName=KarlMogensen.marknav
Thank you for the reply. I'll have a look into it.