vimrc remaps do not respect comments
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
If "Use key mappings from a .vimrc file" is enable in settings, vim comments are not respected on mapping lines. Instead, the content of the comment is interpreted as part of the mapping.
To Reproduce
Steps to reproduce the behavior:
Add this to the vimrc:
map <leader>g gg" isometext
Then, trigger the mapping. Observe that the cursor has jumped to the first line, entered insert mode, and inserted the text "sometext" into the file.
Thank you!
Expected behavior
The behavior should be the same as vim. Running this mapping would execute "gg" and only "gg".
Screenshots
If applicable, add screenshots to help explain your problem.
If remapping-related, please attach log output: https://github.com/VSCodeVim/Vim#debugging-remappings.
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.23.1
- VSCode version: 1.69.0
- OS: macOS Monterey 12.3
Additional context
Add any other context about the problem here.
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 file or test is named in the issue. Start by reproducing the mapping from the report with “Use key mappings from a .vimrc file” enabled, then trace the remapping behavior. Done means the trailing Vim comment is ignored and triggering the mapping executes only “gg”, matching Vim.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vim
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100