Skip to content

Commit

Permalink
Improve config for display line movement
Browse files Browse the repository at this point in the history
Switch to keybindings instead of settings

Ref: VSCodeVim/Vim#3623
Ref: VSCodeVim/Vim#2924 (comment)
  • Loading branch information
karlhorky committed Mar 25, 2019
1 parent 9030c54 commit a0f8cd5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 36 deletions.
14 changes: 12 additions & 2 deletions settings/Library/Application Support/Code/User/keybindings.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,21 @@
{
"key": "up",
"command": "cursorUp",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Insert' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible"
"when": "editorTextFocus && vim.active && !inDebugRepl && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible"
},
{
"key": "down",
"command": "cursorDown",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Insert' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible"
"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"
}
]
47 changes: 13 additions & 34 deletions settings/Library/Application Support/Code/User/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,24 @@
"vim.useSystemClipboard": true,
// "vim.debug.loggingLevel": "debug",
// Fix moving down full lines on word wrapped lines https://stackoverflow.com/a/46436056/1268612
// "vim.insertModeKeyBindings": [
// // Super hacky fix to arrow key bindings below not working
// // https://github.com/VSCodeVim/Vim/issues/2924
// // TODO: Remove! This makes the § symbol very slow.
// "vim.normalModeKeyBindingsNonRecursive": [
// {
// "before": ["§"],
// "after": ["§"]
// "before": ["j"],
// "after": ["g", "j"]
// },
// {
// "before": ["down"],
// "after": ["<C-o>", "g", "j"]
// },
// {
// "before": ["up"],
// "after": ["<C-o>", "g", "k"]
// "before": ["k"],
// "after": ["g", "k"]
// }
// // {
// // "before": ["down"],
// // "after": ["g", "j"]
// // },
// // {
// // "before": ["up"],
// // "after": ["g", "k"]
// // }
// ],
// Fix moving down full lines on word wrapped lines https://stackoverflow.com/a/46436056/1268612
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["j"],
"after": ["g", "j"]
},
{
"before": ["k"],
"after": ["g", "k"]
},
{
"before": ["down"],
"after": ["g", "j"]
},
{
"before": ["up"],
"after": ["g", "k"]
}
],
"files.trimTrailingWhitespace": true,
// "eslint.validate": [
// "javascript",
Expand All @@ -67,9 +49,7 @@
// ],
"editor.tabSize": 2,
"workbench.editor.tabCloseButton": "off",
// "eslint.autoFixOnSave": true,
"eslint.alwaysShowStatus": true,
"flow.useNPMPackagedFlow": true,
"workbench.editor.tabSizing": "shrink",
"window.newWindowDimensions": "maximized",
"workbench.editor.showIcons": false,
Expand All @@ -81,7 +61,6 @@
"javascript.validate.enable": false,
"vim.mouseSelectionGoesIntoVisualMode": false,
"editor.formatOnSaveTimeout": 5000,
// "prettier.tslintIntegration": true,
"prettier.singleQuote": true,
"[markdown]": {
"files.trimTrailingWhitespace": false
Expand Down

0 comments on commit a0f8cd5

Please sign in to comment.