VSCode Notes
Future note to self regarding VSCode/VSCodium
I use VSCode on my Windows work machine and VSCodium on my personal Linux machine.
Addons
- Gitlens by eamodio
- Go by golang
- Vim by vscodevim
Keybindings
keybindings.json
[
{ // create a link to remote git (e.g. Github) for the current line and copy that to clipboard
"key": "ctrl+c l",
"command": "gitlens.copyRemoteFileUrlToClipboard"
},
{ // terminal copy text
"key": "ctrl+c",
"command": "workbench.action.terminal.copySelection",
"when": "terminalFocus"
},
{ // terminal paste text
"key": "ctrl+v",
"command": "workbench.action.terminal.paste",
"when": "terminalFocus"
},
{ // terminal interrupt aka ctrl+c
"key": "ctrl+shift+c",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0003"
},
"when": "terminalFocus"
},
{ // toggle terminal fullscreen/partial screen
"key": "alt+`",
"command": "workbench.action.toggleMaximizedPanel"
},
{ // jump back in the file/line navigation stack
"key": "alt+left", // Windows default, overriden on Linux
"command": "workbench.action.navigateBack"
},
{ // jump forward in the file/line navigation stack
"key": "alt+right", // Windows default, overriden on Linux
"command": "workbench.action.navigateForward"
}
]
To get alt
+`
to work on Gnome I had to go into Gnome preferences -> Keyboard -> Keyboard Shortcuts -> Navigation and alter the ‘Switch Windows of an Application’ item. It says super
+ `
by default but is in reality also aliased to alt
+`
!! Edit the shortcut and make it just super
+`
- this removes the alt
+`
shortcut.
Windows
On Windows I also run WSL2 (Windows Subsystem for Linux) and use that for any VSCode terminal stuff. I found that it would eventually consume all available RAM! To limit RAM usage I put this in .wslconfig
file:
[wsl2]
memory=3GB