Is there a way to go to a global mark from a different file and make it be at the first line?
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Start by reproducing the shown keybinding with a global mark in another file, then trace the cross-file mark navigation and viewport handling; done means the configured jump places the destination at the first line rather than centering it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100