Skip to content

Commit

Permalink
Document display line movement best practices (#3623)
Browse files Browse the repository at this point in the history
* Document display line moving best practices

To vertically move to wrapped lines when word wrap is on.

Ref: #2403 (comment)
Ref: #2924 (comment)

* Remove extra line

* Disable Prettier formatting on code block
  • Loading branch information
karlhorky authored and jpoon committed Apr 3, 2019
1 parent 1da4ad9 commit 723fdff
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ Vim has a lot of nifty tricks and we try to preserve some of them:

- How can I use the commandline when in Zen mode or when the status bar is disabled?

This extension exposes a remappable command to show a vscode style quick-pick, limited functionality, version of the commandline. This can be remapped as follows in visual studio keybindings.json settings file.
This extension exposes a remappable command to show a vscode style quick-pick, limited functionality, version of the commandline. This can be remapped as follows in VS Code's keybindings.json settings file.

```json
{
Expand All @@ -637,6 +637,34 @@ Vim has a lot of nifty tricks and we try to preserve some of them:
}
```

- How can I move the cursor by each display line with word wrapping?

If you have word wrap on and would like the cursor to enter each wrapped line when using <kbd>j</kbd>, <kbd>k</kbd>, <kbd>↓</kbd> or <kbd>↑</kbd>, set the following in VS Code's keybindings.json settings file ([other options exist](https://github.com/VSCodeVim/Vim/issues/2924#issuecomment-476121848) but they are slow):

<!-- prettier-ignore -->
```json
{
"key": "up",
"command": "cursorUp",
"when": "editorTextFocus && vim.active && !inDebugRepl && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible"
},
{
"key": "down",
"command": "cursorDown",
"when": "editorTextFocus && vim.active && !inDebugRepl && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible"
},
{
"key": "k",
"command": "cursorUp",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Normal' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible"
},
{
"key": "j",
"command": "cursorDown",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Normal' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible"
}
```

## ❤️ Contributing

This project is maintained by a group of awesome [people](https://github.com/VSCodeVim/Vim/graphs/contributors) and contributions are extremely welcome :heart:. For a quick tutorial on how you can help, see our [contributing guide](/.github/CONTRIBUTING.md).
Expand Down

0 comments on commit 723fdff

Please sign in to comment.