From a0f8cd5ce35032ce08b3c1fb2cb512adc512f944 Mon Sep 17 00:00:00 2001 From: Karl Horky Date: Mon, 25 Mar 2019 11:32:02 +0100 Subject: [PATCH] Improve config for display line movement Switch to keybindings instead of settings Ref: https://github.com/VSCodeVim/Vim/pull/3623 Ref: https://github.com/VSCodeVim/Vim/issues/2924#issuecomment-476121848 --- .../Code/User/keybindings.json | 14 +++++- .../Code/User/settings.json | 47 +++++-------------- 2 files changed, 25 insertions(+), 36 deletions(-) diff --git a/settings/Library/Application Support/Code/User/keybindings.json b/settings/Library/Application Support/Code/User/keybindings.json index 1c0eeb3..29936f2 100644 --- a/settings/Library/Application Support/Code/User/keybindings.json +++ b/settings/Library/Application Support/Code/User/keybindings.json @@ -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" } ] diff --git a/settings/Library/Application Support/Code/User/settings.json b/settings/Library/Application Support/Code/User/settings.json index dec5382..b48b83a 100644 --- a/settings/Library/Application Support/Code/User/settings.json +++ b/settings/Library/Application Support/Code/User/settings.json @@ -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": ["", "g", "j"] - // }, - // { - // "before": ["up"], - // "after": ["", "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", @@ -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, @@ -81,7 +61,6 @@ "javascript.validate.enable": false, "vim.mouseSelectionGoesIntoVisualMode": false, "editor.formatOnSaveTimeout": 5000, - // "prettier.tslintIntegration": true, "prettier.singleQuote": true, "[markdown]": { "files.trimTrailingWhitespace": false