WebStorm常用快捷鍵
1、查找/代替
Webstorm快捷鍵Eclipse快捷鍵說(shuō)明
ctrl+shift+Nctrl+shift+R通過(guò)文件名快速查找工程內(nèi)的文件(必記)
ctrl+shift+alt+Nctrl+shift+alt+N通過(guò)一個(gè)字符快速查找位置(必記)
ctrl+Fctrl+F在文件內(nèi)快速查找代碼
F3ctrl+K查找下一個(gè)
shift+F3ctrl+shift+K查找上一個(gè)
ctrl+Rctrl+F文件內(nèi)代碼替換
ctrl+shift+R
指定目錄內(nèi)代碼批量替換
ctrl+shift+Fctrl+H指定目錄內(nèi)代碼批量查找
2、界面操作
Webstorm快捷鍵Eclipse快捷鍵說(shuō)明
ctrl+shift+Actrl+shift+A快速查找并使用編輯器所有功能(必記)
alt+[0-9]alt+[0-9]快速拆合功能界面模塊
ctrl+shift+F12ctrl+shift+F12最大區(qū)域顯示代碼(會(huì)隱藏其他的功能界面模塊)
alt+shift+Falt+shift+F將當(dāng)前文件加入收藏夾
ctrl+alt+sctrl+alt+s打開(kāi)配置窗口
ctrl+tabctrl+tab切換代碼選項(xiàng)卡(還要進(jìn)行此選擇,效率差些)
alt+←/→alt+←/→切換代碼選項(xiàng)卡
ctrl+F4ctrl+F4關(guān)閉當(dāng)前代碼選項(xiàng)卡
3、代碼編輯
Webstorm快捷鍵Eclipse快捷鍵說(shuō)明
ctrl+Dctrl+shift+↑復(fù)制當(dāng)前行
ctrl+Walt+shift+↑選中單詞
ctrl+←/→
ctrl+←/→
以單詞作為邊界跳光標(biāo)位置
alt+insertalt+insert新建一個(gè)文件或其他
ctrl+alt+Lctrl+alt+L格式化代碼
shift+tab/tabshift+tab/tab減少/擴(kuò)大縮進(jìn)(可以在代碼中減少行縮進(jìn))
ctrl+Yctrl+D刪除一行
shift+entershift+enter重新開(kāi)始一行(無(wú)論光標(biāo)在哪個(gè)位置)
4、導(dǎo)航
Webstorm快捷鍵Eclipse快捷鍵說(shuō)明
escesc進(jìn)入代碼編輯區(qū)域
alt+F1alt+F1查找代碼在其他界面模塊的位置,頗為有用
ctrl+Gctrl+L到指定行的代碼
ctrl+]/[ctrl+]/[光標(biāo)到代碼塊的前面或后面
alt+up/downctrl+shift+up/down上一個(gè)/下一個(gè)方法
webstorm快捷鍵說(shuō)明
Editing編輯相關(guān)快捷鍵
Ctrl + Space:
Basic code completion (the name of any class, method or variable) 基本代碼完成(任何類、函數(shù)或者變量名稱),改為Alt+S
Ctrl + Shift + Enter:
Complete statement 補(bǔ)全當(dāng)前語(yǔ)句
Ctrl + P:
Parameter info (within method call arguments) 參數(shù)信息 包括方法調(diào)用參數(shù)
Ctrl + mouse over code
Brief Info 簡(jiǎn)單信息
Ctrl + F1
Show description of error or warning at caret 顯示光標(biāo)所在位置的錯(cuò)誤信息或者警告信息
Alt + Insert
Generate code…(Getters, Setters, Constructors)新建一個(gè)文件或者生成代碼,…構(gòu)造函數(shù),可以創(chuàng)建類里面任何字段的getter與setter方法
Ctrl + O
Override methods 重載方法
Ctrl + I
Implement methods 實(shí)現(xiàn)方法
Ctrl + Alt + T
Surround with…(if, else, try, catch, for, etc)用 * 來(lái)圍繞選中的代碼行,( * 包括 if 、 while 、 try catch 等)
Ctrl + /
Comment/uncomment with line comment 行注釋/取消行注釋
Ctrl + Shift + /
Comment/uncomment with block comment 塊注釋/取消塊注釋
Ctrl + W
Select successively increasing code blocks 選擇代碼塊,一般是增量選擇
Ctrl + Shift + W
Decrease current selection to previous state 上個(gè)快捷鍵的回退,減量選擇代碼
Alt + Q
Context info 上下文信息
Alt + Enter
Show intention actions and quick-fixes 意圖行動(dòng),快速見(jiàn)效
Ctrl + Alt + L
Reformat code 根據(jù)模板格式對(duì)代碼格式化
Tab/ Shift + Tab
Indent/unindent selected lines 對(duì)所選行進(jìn)行縮排處理/撤銷縮排處理
Ctrl + X or Shift + Delete
Cut current line or selected block to clipboard 剪切當(dāng)前行或所選代碼塊到剪切板
Ctrl + C or Ctrl + Insert
Copy current line or selected block to chipboard 拷貝當(dāng)前行或者所選代碼塊到剪切板
Ctrl + V or Shift + Insert
Paste from clipboard 粘貼剪切板上的內(nèi)容
Ctrl + Shift + V
Paste from recent buffers 粘貼緩沖器中最新的內(nèi)容
Ctrl + D
Duplicate current line or selected block 復(fù)制當(dāng)前行或者所選代碼塊
Ctrl + Y
Delete line at caret 刪除光標(biāo)所在位置行
Ctrl + Shift + J
Smart line join(HTML and JavaScript only)加入智能行 (HTML 和JavaScript)
Ctrl + Enter
Smart line split(HTML and JavaScript only)分離智能行 (HTML 和JavaScript)
Shift + Enter
Start new line 另起一行
Ctrl + Shift + U
Toggle case for word at caret or selected block 光標(biāo)所在位置大小寫(xiě)轉(zhuǎn)換
Ctrl + Shift + ]/[
Select till code block end/start 選擇直到代碼塊結(jié)束/開(kāi)始
Ctrl + Delete
Delete to word end 刪除文字結(jié)束
Ctrl + Backspace
Delete to word start 刪除文字開(kāi)始
Ctrl + NumPad+/-
Expand/collapse code block 擴(kuò)展/縮減代碼塊
Ctrl + Shift+ NumPad+
Expand all 擴(kuò)張所有
Ctrl + Shift+ NumPad-
Collapse 縮減所有
Ctrl + F4
Close active editor tab 關(guān)閉活躍編輯標(biāo)簽
Search/replace搜索/替代相關(guān)快捷鍵
Ctrl + F
Find 當(dāng)前文件內(nèi)快速查找代碼
Ctrl + Shift + F
Find in path 指定文件內(nèi)尋找路徑
F3
Find next 查找下一個(gè)
Shift + F3
Find previous 查找上一個(gè)
Ctrl + R
Replace 當(dāng)前文件內(nèi)代碼替代
Ctrl + Shift + R
Replace in path 指定文件內(nèi)代碼批量替代
Usage Search搜索相關(guān)快捷鍵
Alt + F7/Ctrl + F7
Find usages/Find usages in file 找到使用/在文件找到使用
Ctrl + Shift + F7
Highlight usages in file文件中精彩使用
Ctrl + Alt + F7
Show usages 顯示使用
Running運(yùn)行
Alt + Shift + F10
Select configuration and run 選擇構(gòu)架,運(yùn)行
Alt + Shift + F9
Select configuration and debug 選擇構(gòu)架,修補(bǔ)漏洞
Shift + F10
Run 運(yùn)行
Shift + F9
Debug 修補(bǔ)漏洞
Ctrl + Shift + F10
Run context configuration from editor 從編輯運(yùn)行內(nèi)容構(gòu)架
Ctrl + Shift + X
Run command line 運(yùn)行命令行
DebuggingDebugging相關(guān)快捷鍵
F8
Step over 不進(jìn)入函數(shù)
F7
Step into 單步執(zhí)行
Shift + F7
Smart step into 智能單步執(zhí)行
Shift + F8
Step out 跳出
Alt + F9
Run to cursor 運(yùn)行到光標(biāo)處
Alt+ F8
Evaluate expression 評(píng)估表達(dá)
F9
Resume program 重新開(kāi)始程序
Ctrl + F8
Toggle breakpoint 切換斷點(diǎn)
Ctrl + Shift + F8
View breakpoints 查看斷點(diǎn)
Navigation定位相關(guān)快捷鍵
Ctrl + N
Go to class跳轉(zhuǎn)到指定類
Ctrl + Shift + N
Go to file 通過(guò)文件名快速查找工程內(nèi)的文件
Ctrl + Alt +Shift + N
Go to symbol 通過(guò)一個(gè)字符查找函數(shù)位置
Alt + Right/ left
Go to next/ previous editor tab 進(jìn)入下一個(gè)/ 上一個(gè)編輯器選項(xiàng)
F12
Go back to previous tool window 進(jìn)入上一個(gè)工具窗口
Esc
Go to editor(from tool window) 從工具窗口進(jìn)入編輯器
Shift + Esc
Hide active or last active window 隱藏活動(dòng)窗口
Ctrl + Shift + F4
Close active run/message/find/…tab 關(guān)閉活動(dòng)….標(biāo)簽
Ctrl + G
Go to line 跳轉(zhuǎn)到第幾行
Ctrl + E
Recent files popup 彈出最近打開(kāi)的文件
Ctrl + Alt + Left/Right
Navigate back/forward 導(dǎo)航前進(jìn)/后退
Ctrl + Shift + Backspace
Navigate to last edit location 向最近編輯定位導(dǎo)航
Alt + F1
Select current file or symbol in any view 查找當(dāng)前選中的代碼或文件在其他界面模塊的位置
Ctrl + B or Ctrl + Click
Go to declaration跳轉(zhuǎn)到定義處
Ctrl + Alt + B
Go to implementation(s) 跳轉(zhuǎn)方法實(shí)現(xiàn)處
Ctrl + Shift + B
Go to type declaration 跳轉(zhuǎn)方法定義處
Ctrl + Shift + I
Open quick definition lookup 打開(kāi)定義快速查找
Ctrl + U
Go to super-method/super-class 跳轉(zhuǎn)方法/超階級(jí)
Alt + Up/Down
Go to previous/next method 在方法間快速移動(dòng)定位
Ctrl + ]/[
Move to code block end/start 跳轉(zhuǎn)到編碼塊結(jié)束/開(kāi)始
Ctrl + F12
File structure popup 文件結(jié)構(gòu)彈出
Ctrl + H
Type hierarchy 類型層次
Ctrl + Alt + H
Call hierarchy 調(diào)用層次結(jié)構(gòu)
F2/ Shift + F2
Next/previous highlighted error 跳轉(zhuǎn)到后一個(gè)/前一個(gè)錯(cuò)誤,高亮錯(cuò)誤或警告快速定位,使用這個(gè)快捷鍵可以快捷在出錯(cuò)的語(yǔ)句之間進(jìn)行跳轉(zhuǎn)。
F4/Ctrl + Enter
Edit source/ View source 編輯源代碼/查看源代碼
Alt + Home
Show navigation bar 顯示導(dǎo)航欄
F11
Toggle bookmark 切換標(biāo)記
Ctrl + F11
Toggle bookmark with mnemonic 采用記憶切換標(biāo)記
Ctrl + #[0-9]
Go to numbered bookmark 跳轉(zhuǎn)到帶編號(hào)的標(biāo)記
Shift + F11
Show bookmark 顯示標(biāo)記
Refactoring重構(gòu)相關(guān)快捷鍵
F5
Copy 拷貝
F6
Move 移動(dòng)
Alt + Delete
Safe Delete 安全刪除
Shift + F6
Rename 重新命名
Ctrl + Alt + N
Inline Variable 嵌入變量
Ctrl + Alt + M
Extract Method( Javascript only) 提取函數(shù)
Ctrl + Alt + V
Introduce Variable 引入變量
Ctrl + Alt + F
Introduce Field 引入域
Ctrl + Alt + C
Introduce Constant 引入常量
VCS/Local History版本控制系統(tǒng)/ 本地歷史相關(guān)快捷鍵
Alt + BackQuote( )
‘VCS’quick popup 快速?gòu)棾?VCS
Ctrl + K
Commit project to VCS 提交項(xiàng)目至VCS
Ctrl + T
Update project from VCS 從VCS 更新項(xiàng)目
Alt + Shift + C
View recent changes 查看最新改變
General常用的相關(guān)快捷鍵
Ctrl + Shift +A
Find action 查找并調(diào)用編輯器的功能
Alt + #[0-9]
Open corresponding tool window 快速切換打開(kāi)界面模塊
Ctrl + Alt + F11
Toggle full screen mode 切換全屏模式
Ctrl + Shift + F12
Toggle maximizing editor 切換最大化編輯器
Alt + Shift + F
Add to Favorites 將當(dāng)前文件添至收藏夾
Alt + Shift + I
Inspect current file with current profile 使用當(dāng)前屬性檢查當(dāng)前文件
Ctrl + BackQuote( )
Quick switch current scheme 快速轉(zhuǎn)換現(xiàn)有組合
Ctrl + Alt + S
Open setting dialog 打開(kāi)設(shè)置對(duì)話框
Ctrl + Tab
Switch between tabs and tool window 標(biāo)簽和工具窗的轉(zhuǎn)換(與windows快捷鍵沖突)