Skip to content

Commit 723fdff

Browse files
karlhorkyjpoon
authored andcommitted
Document display line movement best practices (#3623)
* 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
1 parent 1da4ad9 commit 723fdff

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ Vim has a lot of nifty tricks and we try to preserve some of them:
617617

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

620-
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.
620+
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.
621621

622622
```json
623623
{
@@ -637,6 +637,34 @@ Vim has a lot of nifty tricks and we try to preserve some of them:
637637
}
638638
```
639639

640+
- How can I move the cursor by each display line with word wrapping?
641+
642+
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):
643+
644+
<!-- prettier-ignore -->
645+
```json
646+
{
647+
"key": "up",
648+
"command": "cursorUp",
649+
"when": "editorTextFocus && vim.active && !inDebugRepl && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible"
650+
},
651+
{
652+
"key": "down",
653+
"command": "cursorDown",
654+
"when": "editorTextFocus && vim.active && !inDebugRepl && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible"
655+
},
656+
{
657+
"key": "k",
658+
"command": "cursorUp",
659+
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Normal' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible"
660+
},
661+
{
662+
"key": "j",
663+
"command": "cursorDown",
664+
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Normal' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible"
665+
}
666+
```
667+
640668
## ❤️ Contributing
641669

642670
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).

0 commit comments

Comments
 (0)