1. 程式人生 > 實用技巧 >textmate快捷鍵 彙總

textmate快捷鍵 彙總

>>> hot3.png

TextMate 列編輯模式

按住 Alt 鍵,用滑鼠選擇要插入字元的行。如果僅僅是插入字元,注意選擇 0 列 - 選擇多列的話會把它們覆蓋掉。選擇完畢應該是看到一條細細的豎線,然後輸入要插入的字元。TextMate 會實時顯示所有的更改,很直觀,這是 TextMate 比 VIM 好的地方。

如果只是在許多行前插入空格,則可以選中這些行,使用快捷鍵 Cmd+] 增加縮排,在 TextMate 下方 Tab Size 及是否使用 "Soft Tabs"(用空格取代 Tab).


cmd + option + L 顯示行號
cmd + F 頁面搜尋文字
cmd + shift + F 專案搜尋文字
cmd + G 下一個搜尋文字
cmd + shift + G 上一個搜尋文字
cmd + option + F 替換一個
cmd + ctrl + F 全部替換
cmd + S 儲存
cmd + option + S 全部儲存
cmd + shift + S 另存為。。。。
cmd + shift + -> 選中游標右面的內容
cmd + shift + <- 選中游標左面的內容
cmd + shift + L 選取一行資訊
cmd + L 定位到某一行
cmd + option + -> textmate專案中右面的標籤
cmd + option + <- textmate專案中左面的標籤
cmd + 數字 選擇某個標籤
cmd + -> 游標回到行尾
cmd + <- 游標回到行首
cmd + ^ 游標回到頁首
cmd + 下箭頭 游標回到頁尾
cmd + / 註釋一行
cmd + z 返回前一個內容
cmd + ] 增加縮排
cmd + [ 減少縮排
cmd + T 開啟專案下的檔案
cmd + O 開啟專案
cmd + N 新建檔案
cmd + W 關閉標籤
cmd + X 剪下
cmd + C 複製
cmd + V 粘帖
cmd + M 最小法
cmd + F2 標記
cmd + shift + z 返回後一個內容
cmd + option + [ 格式化程式碼
cmd + shift + T 當前檔案中所有方法的
cmd + shift + W 關閉專案
cmd + option + L 顯示行號
cmd + alt + [ 程式碼格式化
cmd + shift + t 當前檔案中所有的方法導航

ctrl + A 游標回到行首
ctrl + E 游標回到行尾
ctrl + L 自動生成 =>
ctrl + w 選取一個單詞
ctrl + tab 在選單欄和頁面切換
ctrl + 上箭頭 向上移動下拉選單
ctrl + 下箭頭 向下移動下拉選單
ctrl + cmd + 上箭頭 向上移動整行
ctrl + cmd + 下箭頭 向下移動整行
ctrl + shift + k 刪除一行程式碼
ctrl + shift + > (erb模板) 一鍵<%= %>,連續按會出現多種效果
ctrl + option + cmd + V 從歷史中選擇內容粘帖

option|ctrl + -> 游標向右移動一個單詞
option|ctrl + <- 游標向左移動一個單詞
option|ctrl + shift + > 選中游標右面的單詞
option|ctrl + shift + < 選中游標左面的單詞

F2 在標記間切換
tab 輸入def按tab它會自動補全end
esc 以該檔案中已經出現過的詞做自動補全,可以按多次esc切換單詞


view:
F1 Fold current block
cmd+t open file in a new tab
cmd+w close current tab/window
opt+cmd+left/right move to left/right tab (和firefox一樣!)
tab / ^tab 在左邊資料夾側欄與右邊編輯視窗間切換

selection:
^w select current word
shift^l select current line (of course, use shift^left/right to select until head/end of line)

edit:
cmd+return Move to the end of line and insert a newline
shift+cmd+return Move to the end of line, insert a ; and then insert a newline
^k Kill until end of line (^y Yank it back!)
shift^k Kill the whole line (^y Yank it back!)
cmd+backspace delete until head of line
cmd+delete delete until end of line
shift^d duplicate current line
cmd] /cmd[ indent / indent back
cmd / toggle comment

input:
shift^> <%= %> (再按一下變成 <% %>, 再按一下試試,再按一下呢?)
^l =>

[url=http://lfx-cool.iteye.com/blog/436468]本站的另個Textmate快捷鍵[/url]

Ctrl+D 刪除游標右側的一個字元
Ctrl+T 調換選中文字的順序,如果沒有選擇任何文字則對換游標左右字元的位置。並且將游標置於下一個位置
Ctrl+K 刪除游標到行尾的文字
Ctrl+Y 複製出刪除的最後一次文字
Ctrl+O 不移動游標插入新的一行

當然這些快捷鍵在Mac系統中的其它應用中也可以使用,比如Mail。

那個傳說中的小抄列表

09145323_XXcV.png


Some useful TextMate shortcutsGeneral:
⌘+ make font bigger
⌘- make font smaller
⌥⌘T insert special characters
⌃⌘T open "Select Bundle Item" dialog
⌃⇧T show TODOs, FIXMEs, CHANGEDs
⌃⇧A open subversion dialog
⌃⌘R select currently open file in project drawer

Editing:
⌘L go to line number (opens dialog)
⌥→ jump to next right word
⌘⇧T go to symbol (opens dialog)
⌘F2 Add/remove bookmark
F2 go to next bookmark
⇧F2 go to previous bookmark
⌃W select current word
⌘⇧L select current line
⌘/ comment / uncomment selection
⌃⌘↑ move selection up (also works down/left/right)
⌥⇥ indent selection (add ⇧ for opposite direction)
⌘⇧V paste previous entry from clipboard history
⌃⌥⌘V paste from history (opens dialog)
⌃⌥⇧V paste selection online (opens dialog)
⌘↩ add empty line below current (and go to it)
⌘⇧↩ add empty line below current (with line terminator)
⌘⇧& open HTML entity and escape tool dialog
⌃⇧L wrap selection as link (URL from clipboard)
⌃⇧N show count (lines,words,bytes) of selection
lorem⇥ add some (lorem ipsum) text

Projects:
⌃⌘N new project
⌃⌘S save project
⌃⌥⌘D show / hide project drawer
⌃⇥ toggle focus (drawer, buttons, editing)
⌘T open "Go to File" dialog
⌘1-⌘9 open tab number 1-9
⌥⌘→ go to next tab on the right
⌥⌘← go to next tab on the left
⌥⌘↑ switch between same name files (x.c & x.h)

Project Drawer:
↩ open selected file
SPACE rename selected file
→ expand selected folder
← collapse selected folder


⇧⌘T go to symbol
⌘T go to file
⌘↩ like the shift + return in eclipse
⇧⌘↩ five star !!
⌃⌥⌘V show the stuff that you have clipped before
⇧⌘V to paste the previous clip in the list
⌥⌘V To go back you can use
⌃⌘V use this to do a not re-indented insertion
⌥⌘O to open the overwrite mode(instead of inserting mode)
in finding and replacing multiple lines
If you need to insert a newline or tab character into either of the text fields, you can hold down option (⌥) while pressing the tab (⇥) or return (↩) key. This will insert a literal tab or newline character.
⌘E copy the thing you want to find in the public shared clipboard
⌘G find the next occurrence of the string you want to find
⌃⌘F perform the find and replace operation
shift + alt + arrow keys : select by paragraphs or words
shift + arrow keys: select by characters or by lines
shift + cmd + arrow keys: select by the remaining part of the direction you give
⌘[ and ⌘] change indent of text
⌃⌘ + arrow keys: move a line/block up/down a few lines
super combination: shift+cmd+l shift + arrow keys + ctrl + cmd + arrow keys
select + ⌥⌘A : add sth to end of each selected lines
⌥ and making the selection with the mouse
or simply make the regular selection and then press alt
the difference between hard tab and soft tab
Validate Syntax (⌃⇧V)
Wrap in «Something» (⌃⇧W)
Preview Document (⌃⌥⌘P) : the web preview
Comment Toggle (⌘/)
quick open bundle list ctrl + Esc
opendiff
⌃⇧K — delete the current line.
Document Statistics (⌃⇧N)
• Sort Lines in Document / Selection (F5) — this will sort the lines or
• selection alphabetically.

轉載於:https://my.oschina.net/oscfox/blog/503798