http://www.zhihu.com/question/24896283javascript
"folder_exclude_patterns": [ ".svn", ".git", ".hg", "CVS", "node_modules", "bower_components" ],
Set Syntax : [編程語言]
sspy
<div> <h2></h2> <p></p> <p></p> </div> <div> <h2></h2> <p></p> <p></p> </div> <div> <h2></h2> <p></p> <p></p> </div>
class="title"
html:5
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> </body> </html>
div
<div></div>
section#block$*3>h2.title+p.words*2
<section id="block1"> <h2 class="title"></h2> <p class="words"></p> <p class="words"></p> </section> <section id="block2"> <h2 class="title"></h2> <p class="words"></p> <p class="words"></p> </section> <section id="block3"> <h2 class="title"></h2> <p class="words"></p> <p class="words"></p> </section>
Sublime快捷鍵php
Sublime原生自帶的快捷鍵也能很大程度上方便開發,這裏以Mac爲主,windows多數與其類似,如下是Mac下所默認的快捷鍵:css
Machtml
備註:具體符號對應的按鍵前端
爲了方便你們記憶,將快捷鍵分紅了8個類型, 分別爲html5
Edit(編輯)
Selection(光標選中)
Find(查找)
View(視圖)
Go to(跳轉/定位)
Project(工程)
General(通用)
Tabs(標籤欄)
Sublime裏有些插件十分強大,在這裏我推薦我最喜歡的幾個:java
首推node
Emmet:這個插件內置的功能很強大,它的快捷鍵詳細說明以下:python
Modific: gornostal/Modific · GitHubcss3
Highlight lines changed since the last commit
不管git,仍是svn 只要一保存,都能標出代碼的改動狀態,超讚
Tag: HTML格式化
jsformat: javascript格式化
代碼片斷
經常使用的都在這裏能找到,有其它須要就本身配吧:
javascript/snippets/sublime/javascript at sublime-snippets · gyfnice/javascript · GitHub
總結:
這裏面有些快捷鍵單兵做戰能力可能不強,但若是你能靈活使用,將它們配合起來,能發揮很大的威力。
可能你會以爲快捷鍵有些多,記不下來,可是隻要堅持使用,把它變爲習慣,你的開發效率確定會獲得提升的!
但願對你們有幫助,有疑問的能夠單獨私信。
尾聲:windows下的快捷鍵一覽
Alt+R : 開啓正則表達式功能 Alt+Enter: 找到匹配目標後所有選擇 Ctrl+R:前往 method(mac下⌘R) Ctrl+M:跳轉到對應括號 按Ctrl+Shift+上下鍵,可替換行 Ctrl+D:選擇單詞,重複可增長選擇下一個相同的單詞 Ctrl+L:選擇行,重複可依次增長選擇下一行 Ctrl+Shift+P:打開命令面板 Ctrl+P:搜索項目中的文件(mac下⌘P),在裏面輸入: admi@auto 能夠定位到相應文件夾(admin.html)下的相應方法(auto)。 Ctrl+G:跳轉到第幾行 Ctrl+W:關閉當前打開文件 Ctrl+Shift+W:關閉全部打開文件 Ctrl+Shift+V:粘貼並格式化 Ctrl+Shift+L:選擇多行 Ctrl+Shift+Enter:在當前行前插入新行 Ctrl+X:刪除當前行 Ctrl+U:軟撤銷,撤銷光標位置 Ctrl+J:選擇標籤內容 Ctrl+F:查找內容 Ctrl+Shift+F:查找並替換 Ctrl+H:替換 Ctrl+N:新建窗口 Ctrl+K+B:開關側欄 Ctrl+Shift+M:選中當前括號內容,重複可選着括號自己 Ctrl+F2:設置/刪除標記 Ctrl+/:註釋當前行 Ctrl+Shift+/:當前位置插入註釋 Ctrl+Alt+/:塊註釋,並Focus到首行,寫註釋說明用的 Ctrl+Shift+A:選擇當前標籤先後,修改標籤用的 F11:全屏 Shift+F11:全屏免打擾模式,只編輯當前文件 Alt+F3:選擇全部相同的詞 Alt+.:閉合標籤 Alt+Shift+數字:分屏顯示 Alt+數字:切換打開第N個文件 Shift+右鍵拖動:光標多不,用來更改或插入列內容 鼠標的前進後退鍵可切換Tab文件 按Ctrl,依次點擊或選取,可須要編輯的多個位置 Ctrl+shift+D: 備份多個當前行 Ctrl+shift+T: 恢復已經關閉的標籤 Editing Keypress Command Ctrl + X Delete line Ctrl + ↩ Insert line after Ctrl + ⇧ + ↩ Insert line before Ctrl + ⇧ + ↑ Move line/selection up Ctrl + ⇧ + ↓ Move line/selection down Ctrl + L Select line - Repeat to select next lines Ctrl + D Select word - Repeat select others occurrences Ctrl + M Jump to closing parentheses Repeat to jump to opening parentheses Ctrl + ⇧ + M Select all contents of the current parentheses Ctrl + KK Delete from cursor to end of line Ctrl + K + ⌫ Delete from cursor to start of line Ctrl + ] Indent current line(s) Ctrl + [ Un-indent current line(s) Ctrl + ⇧ + D Duplicate line(s) Ctrl + J Join line below to the end of the current line Ctrl + / Comment/un-comment current line Ctrl + ⇧ + / Block comment current selection Ctrl + Y Redo, or repeat last keyboard shortcut command Ctrl + ⇧ + V Paste and indent correctly Ctrl + Space Select next auto-complete suggestion Ctrl + U soft undo; jumps to your last change before undoing change when repeated Windows Ctrl + Alt + Up Column selection up Ctrl + Alt + Down Column selection down Linux Alt + ⇧ + Up Column selection up Alt + ⇧ + Down Column selection up Navigation/Goto Anywhere Keypress Command Ctrl + P Quick-open files by name Ctrl + R Goto symbol Ctrl + ; Goto word in current file Ctrl + G Goto line in current file General Keypress Command Ctrl + ⇧ + P Command prompt Ctrl + KB Toggle side bar Ctrl + ⇧ + Alt + P Show scope in status bar Find/Replace Keypress Command Ctrl + F Find Ctrl + H Replace Ctrl + ⇧ + F Find in files Tabs Keypress Command Ctrl + ⇧ + t Open last closed tab Ctrl + PgUp Cycle up through tabs Ctrl + PgDn Cycle down through tabs Ctrl + ⇆ Find in files Alt + [NUM] Switch to tab number [NUM] where [NUM] <= number of tabs Split window Keypress Command Alt + ⇧ + 2 Split view into two columns Alt + ⇧ + 1 Revert view to single column Alt + ⇧ + 5 Set view to grid (4 groups) Ctrl + [NUM] Jump to group where num is 1-4 Ctrl + ⇧ + [NUM] Move file to specified group where num is 1-4 Bookmarks Keypress Command Ctrl + F2 Toggle bookmark F2 Next bookmark ⇧ + F2 Previous bookmark Ctrl + ⇧ + F2 Clear bookmarks Text manipulation Keypress Command Ctrl + KU Transform to Uppercase Ctrl + KL Transform to Lowercase
先寫個大概,之後有空了就補充的詳細點,把引用的連接都去掉,翻譯成中文,加些圖片之類的:
ln -sf "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
最後,能夠開啓Vintage模式,類vi模式。不懂vi使用的同窗能夠不用看這段
Emmet Git,Document原名爲:Zencoding, 快速生成html,css,默認擴展快捷爲tab,若是tab按鈕損壞,ctrl+e替換。 生成規則在:
Preferences -> Browser packages -> Emment -> emment -> snippets.json
中修改。
Alignment等號對齊 在Preferences -> package settings -> Alignment -> Settings User添加冒號對齊。
{
"align_indent": false,
"alignment_chars": ["=", ":"],
"alignment_space_chars": ["=", ":"]
}
AutoFileName: 文件路徑自動提示