VSCodeVim / VSCodeVim/Vim

Language mode-specific key binding?

Open
#3,079 15 comments 15 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

area/remap kind/enhancement
Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

I'd like to map a keybinding for a specific language mode. Specifically, I'd like to map j to gj, as shown in the README, but only for Markdown.

I've tried a couple variants of the when clause using, for example, resourceLangId == markdown, but since that's used for mappings (and not settings) it doesn't seem to be an option.

Is what I'm trying to do even possible? I have several custom filetype mappings in Vim and would like to carry that approach over to VSCode.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.