您当前的位置: 首页 >  eclipse

liaowenxiong

暂无认证

  • 1浏览

    0关注

    1171博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

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

liaowenxiong 发布时间:2021-01-26 11:33:17 ,浏览量:1

文章目录
    • 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 DownHomeFn + ←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+F9Command+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+RControl+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优化importCommand+ 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选择上一个tabCommand + 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+COption+Command+V⌥⌘VMove移动文件到指定目录Option+Shift+Enter⌥⇧↩Safe Delete安全删除Shift+F6⇧F6Rename重命名Control+T⌃TRefactor this重构这个Option+Command + C⌥⌘CChange Signature更改签名,改成Option+Command+SOption + 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/… tabCommand + 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+IOption + 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模式下的快捷键为佳!

关注
打赏
1661566967
查看更多评论
立即登录/注册

微信扫码登录

0.0465s