Skip to content

Instantly share code, notes, and snippets.

@thor314
Created April 24, 2022 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thor314/e1254cedb2285eb6cc5af624776c22cf to your computer and use it in GitHub Desktop.
Save thor314/e1254cedb2285eb6cc5af624776c22cf to your computer and use it in GitHub Desktop.

VScode Hotkeys

#keybinds #system #vscode

Why bother: I feel most default keybindings are basically acceptible, but spend an unreasonable amount of time fiddling with them, identifying their inconsistencies, and re-assinging them, in the interest of fitting my usage patterns better. Some of this ends up as time wasted, as I forget where I put things, or transfer my key binding preferencs to new systems. This document is intended as my reference for all my key binding nonsense.

Goal 0: explicitly label my keybinds to make them easier to remember, and to reproduce across frequently used applications (Vs code, Obsidian) Goal 1: prefer default vim and GTK/VScode bindings, where possible Goal 2: identify where my preferences, vim, and GTK bindings collide and resolve the collisions. Identify the dead and useless keys in the default maps, and optionally replace them.

Notes VS code vim mode doesn't expose the vim functions as re-bindable. What work around? Obsidian's vim mode is colliding with basic functions (eg. Copy). Work around?

Key default vi (default vscode) ((default extension)) mine + - don't use enough, would like to use more ? - empty bind ! - Can't bind something ? - skeptical, may change op - operator, follow with other keys

todo:

  • M - exec vim macro - how do? Might have to install an extension should bind
  • bind snippets to f1?
  • workspace commands
  • open new window commands
  • git merge commands
  • todos and readme manager
  • snippet creation
  • reserve f1 for workspace operator tasks

Useful VS code modules:

  • Vim
  • Surround selection - to surround selections, by pressing s
  • surround (heavily snippet customizeable)- surround with user defined templates; discard the defaults and make my own? Note to look up whether surround Rust exists, might already
  • File utils: rename, delete, and do other things you would expect to be default functionality

Not useful:

  • macro - basic macro recording
basic shift ctrl ctrl shift alt alt shift ctrl alt ctrl alt shift
a append append EOL (select all) ? ?
o open below open above file: open rec ? quick open recent emoji pick quick open recent
e end word ? end symbol (goto file) ! ?
u undo (vs) redo (vs) cursor undo ! cursor redo
i insert ins BOL (suggestions) + ? ?
d del op del line ? ? ?
h left top screen ? ? ?
t srch fwd ? search back ? transpose chars (reopen closed ed) ?
n next prev file: new file file: new folder file: new folder
s surround sel surround w/ ? ? ?
- up non-white BOL nw (zoom out) ? ?
' go mark op rgstr nxt y/d ? (forward) ? ?
, rpt last f/t ? de-indent ? go back ? ?
. rpt last indent ? go defn ? peek impl
p put put above command palette (command palette) ?
y yank op yank line ? ? ? tog preservecase
p put put above command palette (command palette) ?
f find fwd ? find backwd (find) goto symb in ws find in files
g goto op bottom line git op + (git bar) ?
c change op change to EOL vim ctrl c copy cut
r replace ? replace line replace ? replace in files tog regex
l right (lol) bottom screen expand selection shrink selection (tog find in sel) +
/ search search back comment line ? ?
= quickfix nxt line ? (zoom in) ? ?
\ ? BOL ? (split editor) split editor up/down ?
; rpt f/t ex cmd (test op) + (focus breadcrumbs) ?
q macro quickfix quickfix ? refactor
j down line join line ((rustana ret)) ? ? ?
k up line ? (file op) files explorer ?
x del char del char back (cut) (extensions bar) ?
b back word back symbol ? ? ?
m mark op ? cargo op ((find matching brace)) ?
w fwd wd end symbol (close tab) ? close editors in gp
v sel char sel line vim ctrl v paste ?
z refocus file utils op (undo) (redo) (tog term size) +
` tog terminal toggle case ? move sidebar to panel ?
basic shift ctrl ctrl shift alt alt shift shift alt ctrl alt shift
1 1 ? (1st ed panel) (replace 1) (tab 1)
2 2 exec macro (2nd ed panel) ? (tab 2)
3 3 reg nxt y/d (3rd ed panel) ? (tab 3)
4 4 EOL (4 ed panel) ? (tab 4)
5 5 ? (5 ed panel) ? (tab 5)
6 6 BOL (6 ed panel) ? (tab 6)
7 7 ? (7 ed panel) ? (tab 7)
8 8 ? (8 ed panel) ? (tab 8)
9 9 back_para (9 ed panel) ? (tab 9)
0 BOL fwd para kill eds to right ? kill eds in gp
[ mv op + mv op + vim ctrl [ ? (fold) (prev inline sug) +
] mv op + mv op + vim ctrl ] ? (unfold) (next inline sug) +
f1 ? ? hotkeys ? settings
f2 (rename symbol) (change all occur) ? ? !
f3 left bar foc left bar tog cycle left bar bcycle left ?
f4 right bar foc right bar tog ? ? !
f5 (debugger) ? ? ? ? ?
f6 (focus next) ? ? ? ? ?
f7 prev error last err in dir ? ? ?
f8 next error next err in dir ? ? ?
f9 ? ? ? ? ?
f10 ? ? ? ? ?
f11 (fullscreen) ? ? ? ?
f12 ? ? ? ? ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment