Skip to content

Instantly share code, notes, and snippets.

@memoryonrepeat
Last active June 12, 2020 12:24
Show Gist options
  • Save memoryonrepeat/c328c04d7c4253d0c3950e22f735352d to your computer and use it in GitHub Desktop.
Save memoryonrepeat/c328c04d7c4253d0c3950e22f735352d to your computer and use it in GitHub Desktop.
Selected Sublime shortcuts

https://www.shortcutfoo.com/app/dojos/sublime-text-3-mac/cheatsheet

Navigation

  • CTRL + g: Go to line #
  • CTRL + m: Go to matching bracket

Selection

  • CTRL + SHIFT + m: Select function currently enclosed by current bracket (repeat to select those enclosed by outside brackets)

  • CMD + l: Select current line (repeat to select next line)

  • CMD + d: Select current word (repeat to have more cursors to hightlight same word at other locations, then any change will be applied to all selections - very useful for refactoring) ---> CMD + k + CMD + d: Skip current match

  • CMD + CTRL + g: Multiselect all occurrences of current selection (instead of manually repeating ctrl+d till the end)

  • CMD + SHIFT + j: Select current indentation (esp useful for Python)

  • CMD + SHIFT + space: Select current scope and expand on subsequent commands (esp useful for JS)

  • ALT + mouse dragging: Select an area, with multi cursor for each line

  • CMD + SHIFT + l: Split current selection into each lines, with their own cursors

  • CTRL + SHIFT + UP/DOWN: Place an additional cursor above/ below current one

  • CMD + u: Undo previous selection action

  • CTRL + SHIFT + UP/DOWN: Column selection, one cursor each line

Move within line

  • CMD + CTRL + UP/DOWN: Move current line up/down
  • CMD + LEFT/RIGHT: Move to beginning / end char of current line
  • ALT + LEFT/RIGHT: Move to previous / next word

Commenting

  • CMD + ALT + /: Block comment current selection
  • CMD + /: Comment current line

Autocomplete

  • CMD + Space: Show autocomplete suggestion (depends if there is autocomplete for current language)

Copy/paste

  • CMD + ALT + v: Paste from history

Editing

  • CMD + j: Join line

Visual

  • CMD + ALT + ([ or ]): Fold / unfold current block

Convert column to row

  • CMD + j

Command palette (CMD + p)

  • @: Open list of symbols (functions, vars etc) and navigate
  • :<number>: Go to line number
  • #: Go to fuzzy matched string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment