# Editor shortcuts (VS Code / Cursor and Vim)

 

Use when a user asks how to do something faster in VS Code (or Cursor) or Vim, asks what a keyboard shortcut does (e.g. Ctrl+D, Ctrl+Shift+P, F12, gg, dd, yy, ciw, :wq), wants to customise keybindings, or is stuck in Vim. Gives the correct shortcut for their operating system and can write keybindings.json entries.

 

**Licence** MIT

 

**Source** delaparra-original

 [Download zip](<https://delaparra-services.nl/skills/editor-shortcuts/download>)   

# Editor shortcuts (VS Code / Cursor and Vim)

 

Answer with the shortcut for the user's operating system. If you don't know the OS, give both Windows/Linux and macOS. Keep answers short: shortcut, what it does, when to use it.

 

## VS Code / Cursor (defaults)

    Action Windows / Linux macOS     Command Palette Ctrl+Shift+P Cmd+Shift+P   Quick Open (go to file) Ctrl+P Cmd+P   Go to line Ctrl+G Ctrl+G   Go to definition F12 F12   Rename symbol F2 F2   Quick fix / show actions Ctrl+. Cmd+.   Select next occurrence Ctrl+D Cmd+D   Add cursor above / below Ctrl+Alt+↑ / ↓ Option+Cmd+↑ / ↓   Add cursor at click Alt+Click Option+Click   Move line up / down Alt+↑ / ↓ Option+↑ / ↓   Copy line up / down Shift+Alt+↑ / ↓ Shift+Option+↑ / ↓   Delete line Ctrl+Shift+K Cmd+Shift+K   Delete previous word Ctrl+Backspace Option+Backspace   Move to line start / end Home / End Cmd+← / →   Toggle line comment Ctrl+/ Cmd+/   Format document Shift+Alt+F Shift+Option+F   Search across files Ctrl+Shift+F Cmd+Shift+F   Autocomplete (trigger suggest) Ctrl+Space Ctrl+Space   Toggle sidebar Ctrl+B Cmd+B   Toggle integrated terminal Ctrl+\` Ctrl+\`   Save all Ctrl+K S Option+Cmd+S   Toggle breakpoint F9 F9   Start / continue debugging F5 F5   Step over / into / out F10 / F11 / Shift+F11 F10 / F11 / Shift+F11   Open keyboard shortcuts Ctrl+K Ctrl+S Cmd+K Cmd+S    

Extract method/variable: select code, then Quick fix (Ctrl+. / Cmd+.) and pick "Extract…".

 

Custom keybinding example (` keybindings.json `, open via Command Palette → "Preferences: Open Keyboard Shortcuts (JSON)"):

 

```
[{ "key": "ctrl+alt+t", "command": "workbench.action.terminal.new" }]
```

 

## Terminal

    Action Keys     Cancel / interrupt running command (SIGINT) Ctrl+C   Clear screen Ctrl+L (or ` clear `)   Reverse history search Ctrl+R    

## Vim (normal mode)

    Keys Action     ` Esc ` Back to normal mode (do this first when stuck)   ` :wq ` / ` :q! ` Save and quit / quit without saving   ` gg ` / ` G ` Top / bottom of file   ` dd ` Delete (cut) line   ` yy ` Yank (copy) line   ` p ` Paste after cursor   ` ciw ` Change inner word   ` u ` / ` Ctrl+R ` Undo / redo   ` /text ` then ` n ` Search, next match    

Stuck in Vim after ` git commit ` or ` git rebase -i `? Press ` Esc `, type ` :wq `, Enter. To use VS Code for Git messages instead: ` git config --global core.editor "code --wait" `.

 

## Rules

 

- Shortcuts can be changed by the user or by keymap extensions; if a shortcut "doesn't work", suggest checking Keyboard Shortcuts for conflicts. 
- Don't invent shortcuts. If unsure, point to the Command Palette, which shows the bound shortcut next to each command.

 

## Files

 

- ` LICENSE ` 
- ` SKILL.md ` 
- ` SOURCE.md `

 

## Related terms

 

- [:wq (write & quit)](<https://delaparra-services.nl/knowledge-hub/wq-write-quit>) 
- [/search](<https://delaparra-services.nl/knowledge-hub/search>) 
- [Add Cursor Above / Below](<https://delaparra-services.nl/knowledge-hub/add-cursor-above-below>) 
- [Add Cursor at Click](<https://delaparra-services.nl/knowledge-hub/add-cursor-at-click>) 
- [Autocomplete](<https://delaparra-services.nl/knowledge-hub/autocomplete>) 
- [Cancel / Interrupt (SIGINT)](<https://delaparra-services.nl/knowledge-hub/cancel-interrupt-sigint>) 
- [ciw (change inner word)](<https://delaparra-services.nl/knowledge-hub/ciw-change-inner-word>) 
- [Clear Screen](<https://delaparra-services.nl/knowledge-hub/clear-screen>) 
- [Command Palette](<https://delaparra-services.nl/knowledge-hub/command-palette>) 
- [Copy Line Up / Down](<https://delaparra-services.nl/knowledge-hub/copy-line-up-down>) 
- [dd (delete line)](<https://delaparra-services.nl/knowledge-hub/dd-delete-line>) 
- [Delete Line](<https://delaparra-services.nl/knowledge-hub/delete-line>) 
- [Delete Previous Word](<https://delaparra-services.nl/knowledge-hub/delete-previous-word>) 
- [Extract Method / Variable](<https://delaparra-services.nl/knowledge-hub/extract-method-variable>) 
- [Format Document](<https://delaparra-services.nl/knowledge-hub/format-document>) 
- [gg / G (top / bottom)](<https://delaparra-services.nl/knowledge-hub/gg-g-top-bottom>) 
- [Go to Definition](<https://delaparra-services.nl/knowledge-hub/go-to-definition>) 
- [Go to Line](<https://delaparra-services.nl/knowledge-hub/go-to-line>) 
- [Move Line Up / Down](<https://delaparra-services.nl/knowledge-hub/move-line-up-down>) 
- [Move to Line Start / End](<https://delaparra-services.nl/knowledge-hub/move-to-line-start-end>) 
- [Open Keyboard Shortcuts](<https://delaparra-services.nl/knowledge-hub/open-keyboard-shortcuts>) 
- [p (paste)](<https://delaparra-services.nl/knowledge-hub/p-paste>) 
- [Quick Fix / Show Actions](<https://delaparra-services.nl/knowledge-hub/quick-fix-show-actions>) 
- [Quick Open / Go to File](<https://delaparra-services.nl/knowledge-hub/quick-open-go-to-file>) 
- [Rename Symbol](<https://delaparra-services.nl/knowledge-hub/rename-symbol>) 
- [Reverse History Search](<https://delaparra-services.nl/knowledge-hub/reverse-history-search>) 
- [Save All](<https://delaparra-services.nl/knowledge-hub/save-all>) 
- [Search Across Files](<https://delaparra-services.nl/knowledge-hub/search-across-files>) 
- [Select Next Occurrence](<https://delaparra-services.nl/knowledge-hub/select-next-occurrence>) 
- [Start / Continue Debugging](<https://delaparra-services.nl/knowledge-hub/start-continue-debugging>) 
- [Step Into](<https://delaparra-services.nl/knowledge-hub/step-into>) 
- [Step Out](<https://delaparra-services.nl/knowledge-hub/step-out>) 
- [Step Over](<https://delaparra-services.nl/knowledge-hub/step-over>) 
- [Toggle Breakpoint](<https://delaparra-services.nl/knowledge-hub/toggle-breakpoint>) 
- [Toggle Integrated Terminal](<https://delaparra-services.nl/knowledge-hub/toggle-integrated-terminal>) 
- [Toggle Line Comment](<https://delaparra-services.nl/knowledge-hub/toggle-line-comment>) 
- [Toggle Sidebar](<https://delaparra-services.nl/knowledge-hub/toggle-sidebar>) 
- [yy (yank line)](<https://delaparra-services.nl/knowledge-hub/yy-yank-line>)

 

[Installing an agent skill in Claude Code, Codex, Cursor and Copilot](<https://delaparra-services.nl/manuals/een-skill-installeren-in-je-ai-assistent>)

[HTML version](https://delaparra-services.nl/skills/editor-shortcuts)
