ITeye博客

textmate快捷键 汇总

夜鸣猪 · 2011-11-16 07:20 · RubyOnRails · 编程语言 · Markdown

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本站的另个Textmate快捷键>

Ctrl+D 删除光标右侧的一个字符
Ctrl+T 调换选中文本的顺序,如果没有选择任何文本则对换光标左右字符的位置。并且将光标置于下一个位置
Ctrl+K 删除光标到行尾的文字
Ctrl+Y 复制出删除的最后一次文本
Ctrl+O 不移动光标插入新的一行

当然这些快捷键在Mac系统中的其它应用中也可以使用,比如Mail。

那个传说中的小抄列表

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 ⌘ 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.

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。