Skip to content

Instantly share code, notes, and snippets.

@dinhnv
Last active October 21, 2022 03:57
Show Gist options
  • Save dinhnv/79143ca75f3759db9e799f13918f4347 to your computer and use it in GitHub Desktop.
Save dinhnv/79143ca75f3759db9e799f13918f4347 to your computer and use it in GitHub Desktop.

IDE Shortcuts

Intellij Idea Shortcuts

Linux: Cmd -> Ctrl

  • Navigation
Ctrl     + B                : Jump to Definition
Ctrl     + Alt + B          : Jump to or show all implementations
Ctrl     + Shift + Space    : smart code completion
Ctrl/Cmd + Shift + I        : quick source code lookup
Ctrl     + Q                : Quick JavaDoc Popup
Ctrl/Cmd + W                : select word, block, etc
Cmd + E     	 	    : search in recently (edited) files
Ctrl/Cmd + Shift + Arrow    : Up/Down - move line up/down
Cmd      + P                : show parameters
Alt      + F7               : find usages
Alt      + {Number}         : toggle show/hide palletes (1: project, 2: favorrites(bookmarks, breakpoints), 3: find, 4: Run, etc)
  • Action/Refactoring
Ctrl  + Y  : delete a line
Ctrl  + D  : duplicate a line
Shift + F6 : rename, twice for full options
  • Code View
Ctrl + Shift + F7  : highlight Usages
Ctrl + (Shift) + - : collapse block, shift for all
Ctrl + (Shift) + = : expand block, shift for all
Ctrl + Shift + F12 : toggle full screen mode (custom)
  • Not used usually
Ctrl + Shift + ENTER : complete Statement

Visual Studio Code

Full cheatsheet

Select Project Python Interpreter

Global

Cmd K + Cmd S		: show all keybindings
Cmd + Shift + P		: command palette
Cmd + P				: quick open 
					(to set file keep open, double click on title)
Cmd + K + Z			: toggle zen mode coding
Shift + Cmd + V		: preview mode

Navigation

Ctrl/Cmd + B		: toggle sidebar
Cmd + Shift + E		: toggle explorer

Cmd + T			: search in current tabs
Ctrl + Tab			: previous tab

Cmd + Shift + m		: show status bar (ESLint errors, warnings)
F8, Shift + F8		: cycle through errors

Ctrl + `		: toggle terminal

Cmd   + W             : close current file
F12                   : go to definition
Shift + F12           : find usages

Cmd + Shift + C		: open termial at current project


Cmd + \				: split editor
Cmd + 1, 2, 3		: Switch editors

Cmd + G				: go to next current word
Ctrl + G			: go to line no

Ctrl + -			: navigate back to cursor position
Ctrl + Shift + -		: navigate forward to cursor position

vscode config keybinding.json, use these shortcuts to navigate beetween views

[
    {
        "key": "ctrl+h",
        "command": "workbench.action.navigateLeft"
    },
    {
        "key": "ctrl+l",
        "command": "workbench.action.navigateRight"
    },
    {
        "key": "ctrl+k",
        "command": "workbench.action.navigateUp"
    },
    {
        "key": "ctrl+j",
        "command": "workbench.action.navigateDown"
    }
]

Action/Refactoring

Cmd   + Shift + Space 	: show parameter hints
F2                    	: rename
Cmd   + /             	: toggle comment code
Cmd + d					: select word, n times for n words
Cmd + U					: soft undo (back to previous location)
Ctrl + X				: cut whole line
Alt/Option + Up/down 	: move line up/down
Cmd   + Shift + K     	: delete line
Cmd   + Shift + Enter 	: insert line above
Cmd   + I             	: select line
Cmd   + K + Cmd F     	: format code

To run vscode from cmd line $code .

⇧⌘P > type ‘shell command’ > select ‘Install’

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment