feat: VSCode VIM shortcut fixes & general Linux config updates

This commit is contained in:
Pratik Tripathy
2025-03-31 11:43:08 +05:30
parent cd52eb77cc
commit 1c429bd96e
5 changed files with 52 additions and 48 deletions

View File

@@ -3,8 +3,7 @@
1. Restore my dotfiles on any *nix OS. 1. Restore my dotfiles on any *nix OS.
2. Install required applications on any Linux OS. 2. Install required applications on any Linux OS.
Dotfiles are symlinked from the repo to the required location. Dotfiles are symlinked from the repo to the required location. Changes made in the repository will be automatically reflected on the system when the symlink is created.
That is, changes on repository get auto reflected on the system.
## Usage ## Usage
@@ -12,7 +11,7 @@ That is, changes on repository get auto reflected on the system.
$ git clone https://github.com/pratiktri/dotfiles $ git clone https://github.com/pratiktri/dotfiles
$ sh setup.sh -h $ sh setup.sh -h
Apply all settings stored in the script's directory to your home directory. Apply all settings stored in the scripts directory to your home directory.
Usage: ./setup.sh [OPTION] Usage: ./setup.sh [OPTION]
Options: Options:
@@ -32,7 +31,7 @@ It reads 2 text files to gather lists of software to install:
Any package not available are *skipped*. Any package not available are *skipped*.
`install.sh` calls `install-os-packages.sh` and `install-brew-packages.sh`. Both can be executed separately. `install.sh` calls `install-os-packages.sh` and `install-brew-packages.sh`. But, both can be executed independently.
### Manual installation to be done for various distros ### Manual installation to be done for various distros

View File

@@ -65,12 +65,12 @@
{ {
"key": "shift+escape", "key": "shift+escape",
"command": "workbench.action.focusSideBar", "command": "workbench.action.focusSideBar",
"when": "editorTextFocus", "when": "editorTextFocus"
}, },
{ {
"key": "shift+escape", "key": "shift+escape",
"command": "workbench.action.toggleSidebarVisibility", "command": "workbench.action.toggleSidebarVisibility",
"when": "editorFocus && sideBarVisible", "when": "editorFocus && sideBarVisible"
}, },
// vim.keybindings // vim.keybindings
@@ -132,12 +132,12 @@
{ {
"key": "space b l", "key": "space b l",
"command": "workbench.action.showAllEditors", "command": "workbench.action.showAllEditors",
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
}, },
{ {
"key": "space b x", "key": "space b x",
"command": "workbench.action.closeActiveEditor", "command": "workbench.action.closeActiveEditor",
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
}, },
{ {
"key": "] b", "key": "] b",
@@ -158,7 +158,7 @@
"workbench.files.action.focusFilesExplorer" "workbench.files.action.focusFilesExplorer"
] ]
}, },
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
}, },
{ {
"key": "space e", "key": "space e",
@@ -191,17 +191,17 @@
{ {
"key": "space p", "key": "space p",
"command": "editor.action.clipboardPasteAction", "command": "editor.action.clipboardPasteAction",
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
}, },
{ {
"key": "space y", "key": "space y",
"command": "editor.action.clipboardCopyAction", "command": "editor.action.clipboardCopyAction",
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
}, },
{ {
"key": "space x o", "key": "space x o",
"command": "workbench.action.closeOtherEditors", "command": "workbench.action.closeOtherEditors",
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
}, },
{ {
"key": "ctrl+n", "key": "ctrl+n",
@@ -291,39 +291,47 @@
{ {
"key": "space c i", "key": "space c i",
"command": "editor.action.goToImplementation", "command": "editor.action.goToImplementation",
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
}, },
{ {
"key": "space c r", "key": "space c r",
"command": "editor.action.goToReferences", "command": "editor.action.goToReferences",
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
}, },
{ {
"key": "space c s", "key": "space c s",
"command": "workbench.action.gotoSymbol", "command": "workbench.action.gotoSymbol",
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
}, },
{ {
"key": "space c w", "key": "space c w",
"command": "workbench.action.showAllSymbols", "command": "workbench.action.showAllSymbols",
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
}, },
{ {
"key": "space o", "key": "space o",
"command": "workbench.action.gotoSymbol", "command": "workbench.action.gotoSymbol",
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
}, },
{ {
"key": "space d w", "key": "space d w",
"command": "workbench.actions.view.problems", "command": "workbench.actions.view.problems",
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
},
{
"key": "space d t",
"command": "runCommands",
"when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus",
"args": {
"commands": ["workbench.view.extension.todo-tree-container"]
}
}, },
// Git // Git
{ {
"key": "space g g", "key": "space g g",
"command": "runCommands", "command": "runCommands",
"when": "vim.mode == 'Normal' && editorTextFocus", "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus",
"args": { "args": {
"commands": ["workbench.view.scm", "workbench.scm.focus"] "commands": ["workbench.view.scm", "workbench.scm.focus"]
} }
@@ -341,55 +349,43 @@
{ {
"key": "space g b", "key": "space g b",
"command": "git.checkout", "command": "git.checkout",
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
}, },
{ {
"key": "space g p", "key": "space g p",
"command": "editor.action.dirtydiff.next", "command": "editor.action.dirtydiff.next",
"when": "vim.mode == 'Normal' && editorTextFocus && !textCompareEditorActive" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus && !textCompareEditorActive"
}, },
{ {
"key": "space g c", "key": "space g c",
"command": "git-graph.view", "command": "git-graph.view",
"when": "vim.mode == 'Normal' && editorTextFocus && !textCompareEditorActive" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus && !textCompareEditorActive"
}, },
{ {
"key": "space g l", "key": "space g l",
"command": "git-graph.view", "command": "git-graph.view",
"when": "vim.mode == 'Normal' && editorTextFocus && !textCompareEditorActive" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus && !textCompareEditorActive"
}, },
// Test commands // Test commands
{ {
"key": "space t t", "key": "space t t",
"command": "testing.runAtCursor", "command": "testing.runAtCursor",
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
}, },
{ {
"key": "space t f", "key": "space t f",
"command": "testing.runCurrentFile", "command": "testing.runCurrentFile",
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
}, },
{ {
"key": "space t w", "key": "space t w",
"command": "testing.runAll", "command": "testing.runAll",
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
}, },
{ {
"key": "space t x", "key": "space t x",
"command": "testing.cancelRun", "command": "testing.cancelRun",
"when": "vim.mode == 'Normal' && editorTextFocus" "when": "vim.mode == 'Normal' && editorTextFocus && !terminalFocus"
} }
]
// Make the following work: ctrl+n & ctrl+p for navigation through dropdown
// {
// "key": "ctrl+n",
// "command": "selectNextSuggestion",
// "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
// },
// {
// "key": "ctrl+p",
// "command": "selectPrevSuggestion",
// "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
// },
],

View File

@@ -363,7 +363,11 @@
"Lua.codeLens.enable": true, "Lua.codeLens.enable": true,
// Windsurf // Windsurf
"windsurf.enableAutocomplete": true, "windsurf.enableAutocomplete": false,
"windsurf.enableSupercomplete": true, "windsurf.enableSupercomplete": false,
"windsurf.cascadeOpenOnReload": false "windsurf.cascadeOpenOnReload": false,
"windsurf.autoExecutionPolicy": "off",
"windsurf.explainAndFixInCurrentConversation": true,
"windsurf.enableTabToJump": false,
"windsurf.autocompleteSpeed": "fast"
} }

View File

@@ -215,7 +215,7 @@ SetEditor=false
2 screens: Height=1359 2 screens: Height=1359
2 screens: Width=1279 2 screens: Width=1279
2 screens: Window-Maximized=true 2 screens: Window-Maximized=true
2560x1440 screen: Height=1359 2560x1440 screen: Height=1360
2560x1440 screen: Width=1279 2560x1440 screen: Width=1279
ToolBarsMovable=Disabled ToolBarsMovable=Disabled

View File

@@ -22,7 +22,7 @@ _k_friendly_name=Accessibility
[kcm_touchpad] [kcm_touchpad]
Disable Touchpad=Touchpad Off,Touchpad Off, Disable Touchpad=Touchpad Off,Touchpad Off,
Enable Touchpad=Touchpad On,Touchpad On, Enable Touchpad=Touchpad On,Touchpad On,
Toggle Touchpad=Touchpad Toggle\tMeta+Ctrl+Zenkaku Hankaku,Touchpad Toggle\tMeta+Ctrl+Zenkaku Hankaku, Toggle Touchpad=Touchpad Toggle\tMeta+Ctrl+Zenkaku Hankaku,Touchpad Toggle\tTouchpad Toggle\tMeta+Ctrl+Touchpad Toggle\tMeta+Ctrl+Zenkaku Hankaku,
_k_friendly_name=Touchpad _k_friendly_name=Touchpad
[kmix] [kmix]
@@ -254,6 +254,10 @@ Walk Through Windows of Current Application Alternative (Reverse)=none,,Walk Thr
Window Above Other Windows=none,,Keep Window Above Others Window Above Other Windows=none,,Keep Window Above Others
Window Below Other Windows=none,,Keep Window Below Others Window Below Other Windows=none,,Keep Window Below Others
Window Close=Alt+F4,Alt+F4,Close Window Window Close=Alt+F4,Alt+F4,Close Window
Window Custom Quick Tile Bottom=none,,Custom Quick Tile Window to the Bottom
Window Custom Quick Tile Left=none,,Custom Quick Tile Window to the Left
Window Custom Quick Tile Right=none,,Custom Quick Tile Window to the Right
Window Custom Quick Tile Top=none,,Custom Quick Tile Window to the Top
Window Fullscreen=none,,Make Window Fullscreen Window Fullscreen=none,,Make Window Fullscreen
Window Grow Horizontal=none,,Expand Window Horizontally Window Grow Horizontal=none,,Expand Window Horizontally
Window Grow Vertical=none,,Expand Window Vertically Window Grow Vertical=none,,Expand Window Vertically
@@ -325,6 +329,7 @@ Window to Screen 5=none,,Move Window to Screen 5
Window to Screen 6=none,,Move Window to Screen 6 Window to Screen 6=none,,Move Window to Screen 6
Window to Screen 7=none,,Move Window to Screen 7 Window to Screen 7=none,,Move Window to Screen 7
_k_friendly_name=KWin _k_friendly_name=KWin
disableInputCapture=Meta+Shift+Esc,Meta+Shift+Esc,Disable Active Input Capture
view_actual_size=Meta+0,Meta+0,Zoom to Actual Size view_actual_size=Meta+0,Meta+0,Zoom to Actual Size
view_zoom_in=Meta++\tMeta+=,Meta++\tMeta+=,Zoom In view_zoom_in=Meta++\tMeta+=,Meta++\tMeta+=,Zoom In
view_zoom_out=Meta+-,Meta+-,Zoom Out view_zoom_out=Meta+-,Meta+-,Zoom Out
@@ -358,9 +363,9 @@ powerProfile=Battery\tMeta+B,Battery\tMeta+B,Switch Power Profile
[plasmashell] [plasmashell]
_k_friendly_name=plasmashell _k_friendly_name=plasmashell
activate application launcher=Meta\tAlt+F1,Meta\tAlt+F1,Activate Application Launcher activate application launcher=Alt+F1,Meta\tAlt+F1,Activate Application Launcher
activate task manager entry 1=Meta+1,Meta+1,Activate Task Manager Entry 1 activate task manager entry 1=Meta+1,Meta+1,Activate Task Manager Entry 1
activate task manager entry 10=none,Meta+0,Activate Task Manager Entry 10 activate task manager entry 10=none,,Activate Task Manager Entry 10
activate task manager entry 2=Meta+2,Meta+2,Activate Task Manager Entry 2 activate task manager entry 2=Meta+2,Meta+2,Activate Task Manager Entry 2
activate task manager entry 3=Meta+3,Meta+3,Activate Task Manager Entry 3 activate task manager entry 3=Meta+3,Meta+3,Activate Task Manager Entry 3
activate task manager entry 4=Meta+4,Meta+4,Activate Task Manager Entry 4 activate task manager entry 4=Meta+4,Meta+4,Activate Task Manager Entry 4
@@ -390,7 +395,7 @@ edit_clipboard=none,none,Edit Contents…
manage activities=Meta+Q,Meta+Q,Show Activity Switcher manage activities=Meta+Q,Meta+Q,Show Activity Switcher
next activity=Meta+A,none,Walk through activities next activity=Meta+A,none,Walk through activities
previous activity=Meta+Shift+A,none,Walk through activities (Reverse) previous activity=Meta+Shift+A,none,Walk through activities (Reverse)
repeat_action=none,Meta+Ctrl+R,Manually Invoke Action on Current Clipboard repeat_action=none,,Manually Invoke Action on Current Clipboard
show dashboard=Ctrl+F12,Ctrl+F12,Show Desktop show dashboard=Ctrl+F12,Ctrl+F12,Show Desktop
show-barcode=none,,Show Barcode… show-barcode=none,,Show Barcode…
show-on-mouse-pos=Meta+V,Meta+V,Show Clipboard Items at Mouse Position show-on-mouse-pos=Meta+V,Meta+V,Show Clipboard Items at Mouse Position