Skip to content

Miscellaneous tweaks

Tom Short edited this page Dec 7, 2021 · 5 revisions

Line movement with line wrapping on

With line wrapping, j and k provide movement between lines. It's nice to be able to move between display lines. That's the default with VS Code's up and down arrows. That's the way it works in insert mode. To move between display lines, you can redefine j and k as:

    {
        "key": "j",
        "command": "cursorDown",
        "when": "!inputFocus || editorTextFocus && dance.mode == 'normal' && editorWordWrap"
    },
    {
        "key": "k",
        "command": "cursorUp",
        "when": "!inputFocus || editorTextFocus && dance.mode == 'normal' && editorWordWrap"
    },

This is adapted from a similar issue with VSCodeVim. Line wrapping is especially common in Markdown files.

Clone this wiki locally