日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

IntelliJ IDEA for Mac 在eclipse(MacOS)模式下的快捷键

發布時間:2023/12/3 编程问答 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 IntelliJ IDEA for Mac 在eclipse(MacOS)模式下的快捷键 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

文章目錄

    • Mac鍵盤符號
    • eclipse(MacOS)模式下的快捷鍵
      • General 通用
      • Debugging 調試
      • Search/ Replace 查詢/替換
      • Editing 編輯
      • Refactoring 重構
      • Navigation 導航
      • Usage Search 使用查詢
      • VCS/ Local History 版本控制/本地歷史記錄
      • Live Templates 動態代碼模板
      • Other 官方文檔上沒有體現

Mac鍵盤符號

圖標介紹
?Command
?Shift
?Caps Lock
?Option = Alt
?Control
?Enter
?Delete
?Fn + Delete
上箭頭
下箭頭
左箭頭
右箭頭
?Fn + ↑ = Page Up
?Fn + ↓ = Page Down
HomeFn + ←
EndFn + →
?Tab = 右制表符
?Shift + Tab = 左制表符
?Esc = Escape
?電源開關鍵

eclipse(MacOS)模式下的快捷鍵

General 通用

快捷鍵快捷鍵符號英文名稱功能說明
Command + 0...Command + 9?0…?9Open corresponding tool window打開相應編號的工具窗口
Command + S?SSave all保存所有
Command + Option + Y??YSynchronize同步、刷新
Command + Shift + F12??F12Toggle maximizing editor切換最大化編輯器
Option + Shift + I??IInspect current file with current profile檢查當前文件與當前的配置文件
無法正常顯示?`Quick switch current scheme快速切換當前的scheme(切換主題、代碼樣式等)
Command + ,?,Open Settings dialog打開IDEA系統設置
Command + ;?;Open Project Structure dialog打開項目結構對話框
Command+3?3Find Action查找動作(可設置相關選項)
Control +Tab??Edit window switch編輯窗口標簽和工具窗口之間切換(如果在切換的過程加按上delete,則是關閉對應選中的窗口)
Option + Shift + F??FAdd Favorite添加到收藏夾
Control + Command + F??FSwitch full screen切換全屏模式,最大化
Command+4?+4隱藏顯示run窗口
Shift+Control+R??R運行main方法

Debugging 調試

快捷鍵快捷鍵符號英文名稱功能說明
F6F6Step over進入下一步,如果當前行斷點是一個方法,則不進入當前方法體內
F5F5Step into進入下一步,如果當前行斷點是一個方法,則進入當前方法體內,如果該方法體還有方法,則不會進入該內嵌的方法中
Option + F5?F5Smart step into智能步入,斷點所在行上有多個方法調用,會彈出進入哪個方法
Option + F7?F7step out跳出
Command+R?RRun to cursor運行到光標處,如果光標前有其他斷點會進入到該斷點,建議改成Option+F9
Command+U?UEvaluate expression計算表達式(可以更改變量值使其生效)
F8F8Resume program恢復程序運行,如果該斷點下面代碼還有斷點則停在下一個斷點上
Shift+ Command + B??BToggle breakpoint切換斷點(若光標當前行有斷點則取消斷點,沒有則加上斷點)
Shift +Command + F8??F8View breakpoints查看斷點信息

Search/ Replace 查詢/替換

快捷鍵快捷鍵符號英文名稱功能說明
Double ShiftDouble ?Search everywhere查詢任何東西
Command + F?FFind文件內查找
Command + K?KFind next查找模式下,向下查找
Shift + Command + K??KFind previous查找模式下,向上查找
Command + R?RReplace文件內替換
Control+H?HFind in files全局查找(根據路徑),在文件內搜索
Command + Shift+ R??RReplace in files全局替換(根據路徑),和系統快捷鍵沖突,改成Shift+R
Control+G?GSelect next occurrence選擇下一個引用
Control+Command+G??GSelect all occurrences選擇所有引用
Control+G?GUnselect occurrence取消選擇引,和上面重復了,奇怪~
Command + Shift + S??SSearch Structurally查詢結構(Ultimate Edition 版專用,需要在Keymap中設置)
Command + Shift + M??MReplace Structurally替換結構(Ultimate Edition 版專用,需要在Keymap中設置)

Editing 編輯

快捷鍵快捷鍵符號英文名稱功能說明
Control + Space?SpaceBasic code completion基本的代碼補全(補全任何類、方法、變量),代碼智能提示,因為和切換輸入法快捷鍵沖突,所以基本改成Alt+/
Shift + Option+Space??SpaceSmart code completion智能代碼補全(過濾器方法列表和變量的預期類型
Command + Shift + Enter???Complete statement自動結束代碼,行末自動添加分號
Control+Shift + Space??SpaceParameter info (within method call arguments)顯示方法的參數信息
F2/Option+clickF2/?+clickQuick documentation lookup /Quick documentation顯示當前位置的變量、方法的 Documentation 內容, 快速查看文檔
Shift + F12?F2External Doc查看外部文檔(在某些代碼上會觸發打開瀏覽器顯示相關文檔)
Control+ 鼠標放在代碼上?+mouseBrief Info顯示代碼簡要信息,這個和系統快捷鍵沖突了
Command + F1?F1Show descriptions of error at caret在錯誤或警告處顯示具體描述信息
Command + N, Control + Enter, Control + N?N, ??, ?NGenerate code…自動生成代碼(getter、setter、構造函數、hashCode/equals,toString)
Control + O?OOverride methods覆蓋方法(重寫父類方法)
Control + I?IImplement methods實現方法(實現接口中的方法)
Option + Command + Z??ZSurround?with…包圍代碼(使用if…else, try…catch, for, synchronized等包圍選中的代碼)
Command+/?/Comment/uncomment with line comment單行注釋
Command + Option + /??/Comment/uncomment with block comment塊注釋,多行注釋
Shift + Control + /??/Comment/uncomment with block comment塊注釋,多行注釋
/** + enter/** ?Comment with method/class方法/類的說明注釋
Shift +Control+ 方向鍵上??↑Extend selection連續選中代碼塊
Shift +Control+ 方向鍵下??↓Shrink selection減少當前選中的代碼塊
Control + Shift + Q??QContext info顯示上下文信息
Option + Enter??Show intention actions and quick-fixes顯示意向動作和快速修復代碼,無此動作
Shift+Command +F??FReformat code格式化代碼
Shift+ Command+ O??OOptimize imports優化import
Command+ I?IAuto-indent line(s)自動縮進線
Tab / Shift + Tab? / ??Indent/unindent selected lines縮進代碼 / 反縮進代碼
Command + X?XCut current line to clipboard剪切當前行或選定的塊到剪貼板
Command + C?CCopy current line to clipboard復制當前行或選定的塊到剪貼板
Command + V?VPaste from clipboard從剪貼板粘貼
Command + Shift + V??VPaste from recent buffers…從最近的緩沖區粘貼
Option+Command+↓? ?↓Duplicate current line復制光標所在行的內容,插入光標所在行下面
Command + D?DDelete line at caret刪除當前行或選定的塊的行,刪除光標所在行
Control + Shift + J??JSmart line join智能的將代碼拼接成一行
Command + Enter??Smart line split智能的拆分拼接的行
Shift + Enter??Start new line開始新的一行,光標所在行下方插入空白行
Option+Command+enter???光標所在行上方插入空白行
Option+Command +→ /Command+F6??→/?F6select next tab選擇下個tab,使用F6需要配合FN才行
Option+Command +←Shift+Command+F6??←/Shift?F6select previous tab選擇上一個tab
Command + Shift + ] / Command + Shift + [Select till code block end/ start選擇直到代碼塊結束/開始,不存在此快捷鍵
Command+ Fn + Delete(?鍵為Fn+Delete)? ?Delete to word end刪除到單詞的末尾
Command + Delete??Delete to word start刪除到單詞的開頭
Command + 加號 / Command + 減號?+ / ?-Expand/collapse code block展開 / 折疊代碼塊
Command + Shift + 加號??+Expand all展開所有代碼塊
Command + Shift + 減號??-Collapse all折疊所有代碼塊
Command + W?WClose active editor tab關閉活動的編輯器選項卡
Option+上下箭頭? +上下箭頭Move current line of code移動當前代碼行
Option+enter? ?導入包,自動修正代碼,可以自動補齊代碼語句
Shift+Option+enter?? ?導入包,自動修正代碼
Option+→?→move to next word移到下一個單詞
Option+←?←move to previous word移到上一個單詞
Command+delete??刪除光標前面的單詞
Command+→?→移到行尾
Command+←?←移到行首
Command+Shift+→??→選中當前位置到行尾
Command+Shift+←??←選中當前位置到行首
Shift+Command+X選中部分全部大小寫切換
soutSystem.out.println()
forifor (int i = 0; i < ; i++) {}

Refactoring 重構

快捷鍵快捷鍵符號英文名稱功能說明
F5Copy復制文件到指定目錄,改成Option+C
Option+Command+V??VMove移動文件到指定目錄
Option+Shift+Enter???Safe Delete安全刪除
Shift+F6?F6Rename重命名
Control+T?TRefactor this重構這個
Option+Command + C??CChange Signature更改簽名,改成Option+Command+S
Option + Command + I??IInline一致性
Option + Command + M??MExtract Method將選中的代碼提取為方法,選中部分抽取為方法
Option +Command + L??LIntroduce Variable引入變量
Option +Command + F??FIntrodue Field引入字段
Command + Option + C??CIntroduce Constant提取常量
Command + Option + P??PIntroduce Parameter提取參數

Navigation 導航

快捷鍵快捷鍵符號英文名稱功能說明
Shift+Command + T??TGo to class查找類文件
Shift + Command + R??RGo to file查找所有類型文件、打開文件、打開目錄,打開目錄需要在輸入的內容前面或后面加一個斜杠 /
Command + Option + O??OGo to symbol前往指定的變量 / 方法,選中方法名或者變量,查找方法或者變量
Control + 方向鍵左 / Control + 方向鍵右?← / ?→Go to next/previous editor tab左右切換打開的編輯tab頁,這個快捷鍵不對
F12Go back to previous tool window返回到前一個工具窗口
Esc?Go to editor (from tool window) / focus editor從工具窗口進入代碼文件窗口
Shift + Esc??Hide active or last active tool window隱藏當前或最后一個活動的窗口,且光標進入代碼文件窗口
Command + L?LGo to line在當前文件跳轉到某一行的指定處,跳轉到指定的行
Command + Shift + F4??F4未知關閉活動run/messages/find/… tab
Command + E?ERecent files popup顯示最近打開的文件記錄列表
Command + [ / Command + ]?[/ ?]Navigate back/ forward退回 / 前進到上一個操作的地方
Command + Shift + Delete???Navigate to last edit location跳轉到最后一個編輯的地方
Option + Command+W??WSelect current file or symbol in any view /select in…顯示當前文件選擇目標彈出層,彈出層中有很多目標可以進行選擇(如在代碼編輯窗口可以選擇顯示該文件的Finder)
F3 / Control + 鼠標點擊?B / ? +clickGo to declaration進入光標所在的方法/變量的聲明處
Command + Option + B??BGo to implementation(s)選擇方法名,跳轉到實現處,在某個調用的方法名上使用會跳到具體的實現處,可以跳過接口,改成Control+Option+I
Option + Space, Command + Y? Space, ?YOpen quick definition lookup /quick definition快速打開光標所在方法、類的定義
Control + Shift + B??BGo to type declaration選中類名,跳轉到類型聲明處
Command + U?UGo to Super Method前往當前光標所在方法的父類的方法 / 接口定義
Control + Option+方向鍵下 / Control + Option+方向鍵上??↓ / ??↑previous/next method當前光標跳轉到當前文件的前一個/后一個方法名位置,跳到下一個/上一個成員函數或成員變量
Control + ] / Control+Shift+P?]/??PMove Caret to code block end移動光標到當前所在代碼塊的結束位置,即跳轉到最近的大括號位置
Option+Command+[? ?[Move Caret to code block start移動光標到當前所在代碼塊的開始位置
Command + O?OFile structure popup彈出當前文件結構層,可以在彈出的層上直接輸入進行篩選(可用于搜索類中的方法), 查看當前類成員信息
F4F4Type hierarchy顯示當前類的層次結構
Command + Shift + H??HMethod hierarchy顯示方法層次結構
Control + Option + H??HCall hierarchy顯示調用層次結構
Shift+Command+.??.previous highlighted error跳轉到上一個突出錯誤或警告的位置
Shift+Command+ G??G查找引用
Command+.?.Next highlighted error跳轉到下一個突出錯誤或警告的位置,查看代碼警告
F3F3Edit source/View source /jump to source編輯/查看代碼源
Option + Home? HomeShow navigation bar顯示到當前文件的導航條
F9Toggle bookmark選中文件/文件夾/代碼行,添加/取消書簽
Option + F3?F3Toggle bookmark with mnemonic選中文件/文件夾/代碼行,使用助記符添加/取消書簽
Control + 0...Control + 9?0…?9Go to numbered bookmark定位到對應數值的書簽位置
Command + F3?F3Show bookmarks顯示所有書簽

Usage Search 使用查詢

快捷鍵快捷鍵符號英文名稱功能說明
Shift+Command+G??GFind usages在類中查找用法
Shift+Command+U??UFind usages in file在文件中查找用法
Command + Shift + F7??F7Highlight usages in file在文件中突出顯示的用法
Command + Option + F7??F7Show usages顯示用法
Command+Shift+I??I查看定義的類,快速查看

VCS/ Local History 版本控制/本地歷史記錄

快捷鍵快捷鍵符號英文名稱功能說明
Command + K?KCommit project to VCS/Commit提交代碼到版本控制器
Command + T?TUpdate project from VCS從版本控制器更新代碼
Option+Command+K??KPush commits推送提交
Control + V?V‘VCS’ quick popup/VCS Operations“VCS”快速彈出窗口
Option + Shift + C??CRecent Changes查看最近的變更記錄
Control + C?C‘VCS’ quick popup快速彈出版本控制器操作面板,沒有此動作

Live Templates 動態代碼模板

快捷鍵快捷鍵符號英文名稱功能說明
Option +Command + Z??ZSurround with Live Template彈出模板選擇窗口,將選定的代碼使用動態模板包住,就是添加if/else,try/catch等塊
Command + J?JInsert Live Template插入自定義動態代碼模板

Other 官方文檔上沒有體現

快捷鍵快捷鍵符號英文名稱功能說明
Command + Shift +8??8column selection mode豎編輯模式

說明:刪除線的快捷鍵表示軟件默認沒有此快捷鍵,你需要自己去設置

忠告:開發工具適合自己的就可以了,你熟悉使用eclipse就使用eclipse,你熟悉使用idea就使用idea,如果你希望使用idea又使用eclipse,又不想記住兩套快捷鍵這是不可能的,通過對比發現在idea中使用eclipse(MacOS)的快捷鍵,很多地方需要自定義且和eclipse for Mac默認的快捷鍵也有很多地方不同,所以使用idea的同學建議記住MacOS模式下的快捷鍵為佳!

總結

以上是生活随笔為你收集整理的IntelliJ IDEA for Mac 在eclipse(MacOS)模式下的快捷键的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。