WebStorm 是jetbrains公司旗下一款
JavaScript 開發工具。被廣大中國JS開發者譽為“Web
前端開發神器”、“最強大的
HTML5編輯器”、“最智能的JavaSscript IDE”等。與IntelliJ IDEA同源,繼承了IntelliJ IDEA強大的JS部分的功能.
現將最常用的快捷鍵挑出來備忘,既能方便記憶,又能提高工作效率。
快捷鍵 | 作用 |
command + option + t | 將代碼以某種格式包括起來 |
command + option + l | 將代碼格式化 |
command + shift + u | 切換大小寫 |
control + shift + j | 合並行 |
option + delete | delete to word start |
option + fn + delete | delete to word end |
option + -> | 以單詞為單位移動光標 |
option + <- | 以單詞為單位移動光標 |
Ctrl+Shift+/ | /*…*/注釋 |
編輯頁面快捷鍵:
html:5 | Html5結構 |
link:css | 引入css |
script:src | 引入js |
script | html中插入js |
ul+ | ul及一個li |
a:link | <a href=”http://”></a> |
a:mail | <a href=”mailto:“></a> |
form:get | get表單 |
input:hidden | hidden輸入框 |
div#name | id:name |
div.name | class:name |
div.one.two | class:one,two |
head>link:css | head加link |
p+p | 兩個p |
p*3 | 3個p |
ul>li.item$*6 | 創建ul下有個li同時class分別為item1,item2.。。 |
pos | postion,組合可用pos:s|a|r|f |
t | top,組合a auto |
r | right,組合 a |
l | left |
b | bottom |
z | z-index |
fl | float |
cl | clear |
d | display 組合可用n|b|i|ib |
v | visibility |
ov | overflow |
zoo | zoom:1 |
cp | clip |
bx | box-sizing |
bxsh:w | -webkit-box-shadow: 0 0 0 #000; |
WebStorm快捷鍵(Mac版)
⌘——Command
⌃ ——Control
⌥——option
⇧——Shift
⇪——Caps Lock
fn——功能鍵就是fn
編輯
Command+option+T 用 (if..else, try..catch, for, etc.)包住
Command+/ 注釋/取消注釋的行注釋
Command+option+/ 注釋/取消注釋與塊注釋
option+↑ 向上選取代碼塊
option+↓ 向下選取代碼塊
tab,shift+tab 調整縮進
Control+option+l 快速調整縮進 格式化代碼
Command+C 復制
Command+X 剪切
Command+V 粘貼
Command+shift+V 從剪貼板里選擇粘貼
Command+D 復制代碼副本
Command+delete 刪除當前行
shift+回車 快速換行
Command+回車 換行光標還在原先位置
Command+shift+U 大小寫轉換
Command+shift+[,Command+shift+] 文件選項卡快速切換
Command+加號,Command+減號 收縮代碼塊
Command+shift+加號,Command+shift+減號 收縮整個文檔的代碼塊
Command+W 關閉當前文件選項卡
option+單擊 光標在多處定位
Control+shift+J 把下面行的縮進收上來
shift + F6 高級修改,可快速修改光標所在的標簽、變量、函數等
option+/ 代碼補全
調試
Control+option+R 運行項目
Command+Control+R 運行Debug
Command+F8 添加斷點
Command+shift+F8 打開斷點列表
導航
Command+O 跳轉到某個類
Command+shift+O 跳轉到某個文件
Command+option+O 跳轉到某個符號
Control+←,Control+→ 轉到上/下一個編輯器選項卡
F12 打開之前打開的工具窗口(TODO、終端等)
Command+L 跳轉行
Command+E 彈出最近文件
Command+option+←,Command+option+→ 向前向后導航到代碼塊交接處(一般是空行處)
Command+shift+delete 導航到上一個編輯位置的位置
Command+B 跳轉到變量聲明處
Control+J 獲取變量相關信息(類型、注釋等,注釋是拿上一行的注釋)
Command+Y 小浮窗顯示變量聲明時的行
Command+[,Command+] 光標現在的位置和之前的位置切換
Command+F12 文件結構彈出式菜單
option+H 類的層次結構
F2,shift+F2 切換到上\下一個突出錯誤的位置
Command+↑ 跳轉到導航欄
F3 添加書簽
option+F3 添加帶助記的書簽
option+1,option+2… 切換到相應助記的書簽位置
Command+F3 打開書簽列表
VCS/本地歷史記錄
control+V 打開VST小浮窗
Command+K 提交項目
Command+T 更新項目
option+shift+C 打開最近修改列表
搜索和替換
Command+F 搜索
Command+R 替換
Command+G 查找下一個
Command+shift+G 查找下一個
Command+shift+F 按路徑搜索
Command+shift+R 按路徑替換
選中文字的搜索
Command+F7 向聲明的地方搜索並選中
Command+shift+F7 打開搜索框進行搜索
Command+option+F7 打開小浮窗顯示搜索列表
對項目文件的操作(重構)
F5 復制文件到某個目錄
F6 移動文件到某個目錄
Command+delete 安全刪除
shift+F6 重命名
全局的
雙擊shift 彈出小浮窗搜索所有
Command+切換項目 Command+shift+ 反向切換項目
Command+shift+A 整個工程的查找操作
Command+1,Command+2… 打開各種工具窗口
option+shift+F 把文件添加到收藏夾
option+shift+I 打開項目描述
option+~ 快速切換當前計划
Command+, 設置編輯器
Control+Tab 選項卡和工具窗口之間進行切換
alert+回車 顯示npm版本升級列表