入門Mac快捷鍵詳細分類整理,包括Eclipse和Android Studio中一些常用的快捷鍵


[通用]

control(^)    

shift(⇧)   ⬆️

option/alt (⌥)

command(⌘)

fn 副功能鍵

 

[效率]

1.編輯

control + space 切換輸入法(改鍵:alt(⌥)+space可見  control+alt(⌥)+space快速切換)

control+ command + space 打開系統表情

shift+control+space 手寫輸入(改鍵:alt(⌥)+H )

command+←/→(↑/↓) Home/End

Fn+↑/↓ pageUp/pageDown

command+]/[ 前進/回退 后翻頁/前翻頁

command s/c/v/x 保存/拷貝/粘貼/剪切(只能剪切文件和文件夾,不能剪切應用程序)

Fn+delete 反向刪除

control+D 快速刪除當前行

shift+command+←/→ 快速選中

shift+alt(⌥)+←/→ 快速選中光標出關鍵字

shift+←/→ 自定義選中

command+. 智能提示

 

 

2.系統功能

command+space 打開spotlight搜索

alt (⌥)+command+space 打開Finder

alt (⌥)+command+D 打開/隱藏 Dock欄

 

alt (⌥)+command+esc 打開強制退出應用程序

 

shift+command+3/4 截全屏/選區截屏(+空格快速選中當前活動窗口)

command+Q 退出程序

command+M 最小化

control (^)+command+F 全屏切換(會開啟新桌面)

command+(shift)+tab 當前桌面窗口切換

command+H 隱藏活動窗口

 

 

3.Finder文件管理器

alt (⌥)+command+space 快速打開Finder

command +K 打開遠程服務器連接

shift+command+G 快速前往文件目錄

command +(↑/↓) 上一級/下一級文件目錄

 

command+H 隱藏Finder

alt (⌥)+command+H 隱藏其他

 

/etc/hosts hosts目錄

 

 

 

[Safari]

command+T 新建Tab

command + W 關閉當前Tab

command+N 新建窗口

shift+command+N 新建無痕窗口

command+]/[ 前進/回退 后翻頁/前翻頁

control (^)+command+F Safari全屏切換(通)

control (^)+command+1/2/3(L)  顯示邊欄書簽/閱讀列表/鏈接

shift+/command+B 頂部顯示書簽欄

 

command +L 快速打開收藏網址(位置)

option/alt(⌥) +command +L 打開下載目錄

 

command+Y 歷史記錄

command+D 快速收藏

option/alt(⌥)+command+B 書簽管理

 

 

[eclipse]

1.搜索

control+alt(⌥)+H 當前Tab中查找引用

alt(⌥)+command+G 查找工作空間中所有引用

shift+command+L 快捷鍵全覽

2.效率

command+/ 注釋當前行

control+command+/ 注釋多行

shift+command+\ 取消多行注釋

alt(⌥)+/ 智能提示

control+Q 回到上次編輯的位置

shift+Fn+command+. 快速查找當前tab中警告代碼位置

command+]/[ (或alt(⌥)+command+←/→) 前進/回退 

alt(⌥)+F7 切換當前Tab中不同功能視圖

shift+enter 在下方插入一行

shift+command+enter 在上方插入一行

alt(⌥)+(↑/↓) 當前行上移/下移

 

 

 

[Android Studio]

1.效率

command+N 打開Generate,快速生成getter,setter,Constructor 等

alt(⌥)+F1 快速選擇當前編輯的要素(class,file,method,field)

F12 把焦點移動到上一個聚焦的工具窗口

command+F12 顯示當前類文件的結構

control+H 查看類繼承層級結構

shift+F6 快速重命名

command+;/↓ 打開project structure面板

shift+command+(↑/↓) 伸縮Tool工具條高度

shift+command+’ 最大化最小化工具條面板

alt()+command+F7 顯示所有類,方法和變量(edite|find|show usages)

 

[比較代碼]

command+D 項目面板中選中不同文件進行比較

 

效率(高級)

command+9 快速打開版本控制工具,顯示刪除,修改,未提交文件,這里可進行版本操作

shift+alt(⌥)+C 快速查看project最近的改動

Refactor|Copy 選中一個類后方便的復制該類(F5)

F6 快速將一個靜態內部類轉換成高一層類

 

搜索(導航)

double shift 全局搜索

command+O 致搜索自己的src包下面的類

alt(⌥)+command+O 只搜索編輯器中Java源碼中,的字段,方法,類(找文件時很管用)

shift+command+O 當前項目中搜索文件,包括res,libs(找方法時很管用)

control+(↑/↓) 快速在方法之間進行切換

shift+command+R 全局搜索和替換

 

搜索(閱碼)

command+B 跳轉到定義

alt()+space 快速查看定義

command+P 查看方法參數(F1,查看文檔幫助)

alt(⌥)+F7 查找所有引用(Edit|Find|)

shift+alt(⌥)+command+F7 在類中快捷查看引用

shift+command+F7 查找方法中出現的關鍵字,光標在方法的throws和try,catch處快速完成代碼

 

command+-/+ 折疊當前塊

alt(⌥)+-/+ 逐級折疊

shift+command+-/+ 折疊所有代碼

 

2.編輯

control+space 智能補全

alt(⌥)+shift+Space 顯示智能提示下拉列表

shift+command+enter 快速完成該行代碼(complement current statement)

Tab 動態生成典型代碼模版

command+N 快速生成代碼(構造函數,getter,setter,toString等)

command+J 打開動態代碼模版(輸入it 然后按command+J回顯示所有包含it的模板)

alt(⌥)+command+J 快速為選中代碼包裝代碼模板

 

alt(⌥)+command+L 快速整理代碼

control+shift+J 快速合並兩行代碼,並去除多余空格

shift+command+V 打開粘貼板,選擇最近復制的內容進行插入

 

alt()enter 快速導入包(快速生成測試類等多用途...)

shift+command+delete 回到上次編輯的位置

command+D 快速復制當前行到下一行

shift+alt(⌥)+(↑/↓) 當前行上移/下移

shift+alt(⌥)+←/→ 快速選中光標出關鍵字

command+(home/end) 移動到代碼最頂部/底部

Alt+mouse control 快速選中多行

shift+command+enter/command+enter 在下面/上面插入空行,注意光標要在代碼最前面

Command/Fn/alt(⌥)+delete 1.2刪除當前行/3刪除一個關鍵字

 

3.調試

F8 逐行調試

F7 進入自己的代碼內部

shift+F7 進入系統API代碼內部

shift+F8 跳出方法

alt(⌥)+command+R 跳轉到下一個斷點

shift+command+F8 查看所有斷點

control+D debug調試

control+R Run運行

control+alt(⌥)+R Run/Debug

alt()+F8(↑) Debug時快速執行監視(按住alt,然后鼠標點擊可快速計算選中代碼執行結果)

 

command+F8 插入斷點Toogle Line Breakpoint

shift+command+F8 編輯斷點

shift+alt(⌥)+command+F8 插入臨時斷點Toogle Temporary Line Breakpoint

 

調試(BUG解決)

F2/shift+F2 在語法錯誤syntax error 之間快速切換

alt(⌥)+command+(↑/↓) 在編譯錯誤compiler error之間跳轉

 

4.版本控制

Schedule for Deletion /DeveloDocs/../ZaiNa/.idea/libraries

 

5.編輯器

control+`快速切換顏色、代碼樣式、快捷鍵等方案(view-switch scheme)

command+`快速切換IDE多窗口

alt(⌥)+command+Y 刷新


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM