Skip to content

Instantly share code, notes, and snippets.

@chinghanho
Forked from lucasfais/gist:1207002
Created August 14, 2012 04:18
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save chinghanho/3346205 to your computer and use it in GitHub Desktop.
Save chinghanho/3346205 to your computer and use it in GitHub Desktop.
Sublime Text 2: Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T 切換檔案
⌘⌃P 切換專案
⌘R 畫面切換到 method
⌃G 畫面切換到指定行數
⌘KB 關閉 / 開啟側邊欄
⌘⇧P 開啟指令控制面板
⌃ ` Python 控制台
⌘⇧N 開新視窗 (開新專案時很有用)

Editing

⌘L 選擇游標所在的行列(重複選取下一行)
⌘D 選擇游標所在的單字(重複多重選取另一個相同的單字)
⌃⇧M 選擇括號內的內容
⌘⇧↩ 在上一行插入新行列
⌘↩ 在下一行插入新行列
⌃⇧K 刪除整行
⌘KK 刪除游標之後的所有內容
⌘K⌫ delete from cursor to start of line
⌘⇧D duplicate line(s)
⌘J join lines
⌘KU upper case
⌘KL lower case
⌘ / comment
⌘⌥ / block comment
⌘Y redo or repeat
⌘⇧V past and ident
⌃ space autocomplete (repeat to select next suggestion)
⌃M jump to matching brackets
⌘U soft undo (movement undo)
⌘⇧U soft redo (movement redo)

XML/HTML

⌘⇧A select content into tag
⌘⌥ . close tag

Find/Replace

⌘F find
⌘⌥F replace
⌘⌥G find next occurrence of current word
⌘⌃G select all occurrences of current word for multiple editing
⌘⇧F find in files

Splits/Tabs

⌘⌥1 single column
⌘⌥2 two columns
⌘⌥5 grid (4 groups)
⌃[1,2,3,4] focus group
⌃⇧[1,2,3,4] move file to group
⌘[1,2,3…] select tab

Bookmarks

⌘F2 toggle bookmark
F2 next bookmark
⇧F2 previous bookmark
⌘⇧F2 clear bookmarks

Marks

⌘K space set mark // ⌘K; for me
⌘KW delete from cursor to mark
⌘KA select from cursor to mark
⌘KG clear mark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment