idea2021安装教程与常见配置(可激活至2099年)

idea2021安装教程与常见配置(可激活至2099年)

下载

官网下载地址:https://www.jetbrains.com/zh-cn/idea/download/other.html

image-20240904170645884

这里我们选择压缩包安装方式,选择2021.3 - Windows x64 ZIP Archive (zip),也可以选择exe安装方式

安装

解压缩安装方式

  1. 创建非中文目录D:\idea2021
  2. 解压ideaIU-2021.1.3.win.zip到D:\idea2021
  3. 打开cmd窗口,切换到D:\idea2021\ideaIU-2021.1.3.win\bin
  4. 执行idea.bat
  5. 创建快捷方式

image-20240904164421412

注意:虽然是解压缩版,jdk等位置变动也会影响,删除原先的,重新再执行一遍即可(解压缩安装的好处就是即便重置系统了,只需要再次解压,然后执行以下idea.bat即可)

exe方式安装

exe方式安装比较简单,下载后双击,然后一路next直到完成即可

重要目录

.IntelliJIdea2021

在这里插入图片描述
这是 IDEA 的各种配置的保存目录。这个设置目录有一个特性,就是你删除掉整个目录之后,重新启动 IntelliJ IDEA 会再自动帮你生成一个全新的默认配置,所以很多时候如果你把 IntelliJ IDEA 配置改坏了,没关系,删掉该目录,一切都会还原到默认。

config

在这里插入图片描述
config 目录是 IntelliJ IDEA 个性化化配置目录,或者说是整个 IDE 设置目录。此目录可看成是最重要的目录,没有之一,安装新版本的 IntelliJ IDEA 会自动扫描硬盘上的旧配置目录,指的就是该目录。这个目录主要记录了:IDE 主要配置功能、自定义的代码模板、自定义的文件模板、自定义的快捷键、Project 的 tasks 记录等等个性化的设置。

system

system 目录是 IntelliJ IDEA 系统文件目录,是 IntelliJ IDEA 与开发项目一个桥梁目录,里面主要有:缓存、索引、容器文件输出等等,虽然不是最重要目录,但也是最不可或缺的目录之一。
在这里插入图片描述

激活

idea2023可激活至2099年,详细教程见https://download.csdn.net/download/weixin_41883161/89713350

常用配置

Appearance & Behavior(外观和行为)

在这里插入图片描述

这里默认提供了三套主题:IntelliJ,Darcula,Windows。这里可以根据自己的喜好进行选择.

设置字体及字体大小 (可忽略)

在这里插入图片描述

Editor 编辑器

Editor -general

滚轮改变字体大小(可忽略)

在这里插入图片描述
我们可以勾选此设置后,增加 Ctrl + 鼠标滚轮 快捷键来控制代码字体大小显示。

设置自动导包功能

在这里插入图片描述

  • Add unambiguous imports on the fly:自动导入不明确的结构
  • Optimize imports on the fly:自动帮我们优化导入的包

设置显示行号和方法间的分隔符在这里插入图片描述

  • 如上图红圈所示,可以勾选 Show line numbers:显示行数。我建议一般这个要勾选上。
  • 如上图红圈所示,可以勾选 Show method separators: 显示方法分隔线。这种线有助于我们区分开方法,所以建议勾选上。

忽略大小写提示

在这里插入图片描述

设置多行显示 tabs 的操作

在这里插入图片描述
在打开很多文件的时候,IntelliJ IDEA 默认是把所有打开的文件名 Tab 单行显示的。但是我个人现在的习惯是使用多行,多行效率比单行高,因为单行会隐藏超过界面部分 Tab,这样找文件不方便。

Editor-Font

设置默认的字体、字体大小、字体行间距在这里插入图片描述

Editor – Color Scheme

修改当前主题的字体、字体大小、字体行间距(可忽略)

在这里插入图片描述
如果当前主题不希望使用默认字体、字体大小、字体行间距,还可以单独设置:

修改代码中注释的字体颜色

修改当前主题的控制台输出的字体及字体大小(可忽略)

在这里插入图片描述

修改代码中注释的字体颜色

在这里插入图片描述

  • Doc Comment – Text:修改文档注释的字体颜色
  • Block comment:修改多行注释的字体颜色
  • Line comment:修改当行注释的字体颜色

Editor – Code Style

设置超过指定 import 个数,改为* (可忽略)

在这里插入图片描述

Editor – File and Code Templates

修改类头的文档注释信息

在这里插入图片描述

/**
@author shkstart
@create ${YEAR}-${MONTH}-${DAY} ${TIME}
*/

常用的预设的变量,这里直接贴出官网给的

${PACKAGE_NAME} - the name of the target package where the new class or interface will be created. 
${PROJECT_NAME} - the name of the current project. 
${FILE_NAME} - the name of the PHP file that will be created. 
${NAME} - the name of the new file which you specify in the New File dialog box during the file creation. 
${USER} - the login name of the current user. 
${DATE} - the current system date. 
${TIME} - the current system time. 
${YEAR} - the current year. 
${MONTH} - the current month. 
${DAY} - the current day of the month. 
${HOUR} - the current hour. 
${MINUTE} - the current minute. 
${PRODUCT_NAME} - the name of the IDE in which the file will be created. 
${MONTH_NAME_SHORT} - the first 3 letters of the month name. Example: Jan, Feb, etc. 
${MONTH_NAME_FULL} - full name of a month. Example: January, February, etc.

Editor – File Encodings

设置项目文件编码

在这里插入图片描述
说明:Transparent native-to-ascii conversion 主要用于转换 ascii,一般都要勾选,不然 Properties 文件中的注释显示的都不会是中文。

Build,Execution,Deployment

设置自动编译

在这里插入图片描述

设置快捷键(Keymap)

通过快捷键功能修改快捷键设置

在这里插入图片描述

通过指定快捷键,查看或修改其功能

在这里插入图片描述

配置管理

导入已有配置

在这里插入图片描述

导出已有配置

在这里插入图片描述

设置新项目的默认配置

在这里插入图片描述

常用快捷键

描述eclipseidea
SelectAllOccurrencesalt control Ycontrol alt shift J
MoveStatementDownalt DOWNcontrol shift DOWN
ShowIntentionActionsalt ENTER|shift alt J|shift control Malt ENTER
ActivateNavBaralt F11null
ViewNavigationBaralt HOMEnull
Backalt LEFTcontrol alt LEFT
Unwrapalt Rcontrol shift DELETE
Forwardalt RIGHTcontrol alt RIGHT
MoveElementLeftalt shift LEFTcontrol alt shift LEFT
MoveElementRightalt shift RIGHTcontrol alt shift RIGHT
UnselectPreviousOccurrencealt shift Yalt shift J
MoveStatementUpalt UPcontrol shift UP
SelectNextOccurrencealt Yalt J
EditorDuplicateLinescontrol alt DOWNnull
ReformatCodecontrol alt L|shift control Fcontrol alt L
OptimizeImportscontrol alt O|shift control Ocontrol alt O
PreviousEditorTabcontrol alt shift RIGHTalt shift LEFT
EditorCodeBlockEndcontrol CLOSE_BRACKETcontrol CLOSE_BRACKET
EditorDeleteLinecontrol Dcontrol Y
Replacecontrol Fcontrol R
Reruncontrol F11control F5
FindWordAtCaretcontrol F12control F3
FileStructurePopupcontrol F3|control Ocontrol F12
SmartStepIntocontrol F5shift F7
NextTabcontrol F6|control alt LEFT|control PAGE_DOWNalt RIGHT
Diff.NextChangecontrol F6|control alt LEFT|control PAGE_DOWNalt RIGHT
NextDiffcontrol F7F7
CompileDirtycontrol F9|control Bcontrol F9
FindUsagescontrol Galt F7
FindInPathcontrol Hcontrol shift F
AutoIndentLinescontrol Icontrol alt I
IncrementalSearchcontrol Jnull
FindNextcontrol KF3|control L
GotoLinecontrol Lcontrol G
ExpandAllRegionscontrol MULTIPLYcontrol shift ADD|control shift EQUALS
ShowPopupMenucontrol N|shift alt S|control F10|shift alt TCONTEXT_MENU
Printcontrol Pnull
FileChooser.TogglePathShowingcontrol Pcontrol P
JumpToLastChangecontrol Qcontrol shift BACK_SPACE
RunToCursorcontrol Ralt F9
NextEditorTabcontrol shift alt LEFTalt shift RIGHT
GotoImplementationcontrol T|control alt Bcontrol alt B
EvaluateExpressioncontrol Ualt F8
CloseActiveTabcontrol Wcontrol shift F4
$Redocontrol Ycontrol shift Z|alt shift BACK_SPACE
$Undocontrol Zcontrol Z|alt BACK_SPACE
EditSourceF12|shift control EF4
GotoDeclarationF3control B
TypeHierarchyF4control H
StepIntoF5F7
StepOverF6F8
StepOutF7|shift F8shift F8
ResumeF8|F9F9
ChangeSignatureshift alt Ccontrol F6
ToggleBookmarkWithMnemonicshift alt control F11control F11
Debugshift alt D|shift F9shift F9
EditorUnSelectWordshift alt DOWNcontrol shift W
DelegateMethodsshift alt Enull
RerunTestsshift alt Gshift alt R
RunDashboard.ShowConfigurationsshift alt Hcontrol shift T
Inlineshift alt Icontrol alt N
IntroduceVariableshift alt L|control alt Vcontrol alt V
ExtractMethodshift alt Mcontrol alt M
HighlightUsagesInFileshift alt O|shift control F7control shift F7
ImplementMethodsshift alt Pcontrol I
ChangesView.Renameshift alt RF2|Shift F6
RenameElementshift alt Rshift F6
Git.Reword.Commitshift alt RF2|Shift F6
ShelvedChanges.Renameshift alt RF2|Shift F6
SmartTypeCompletionshift alt SPACEcontrol shift SPACE
EditorSelectWordshift alt UPcontrol W
Moveshift alt VF6
Runshift alt X|shift F10shift F10
SurroundWithshift alt Z|control alt Tcontrol alt T
InsertLiveTemplateshift control alt Jcontrol J
ToggleLineBreakpointshift control B|control F8control F8
EditorDeleteToLineEndshift control DELETEnull
CollapseAllRegionsshift control DIVIDEcontrol shift SUBTRACT|control shift MINUS
MethodDownshift control DOWNalt DOWN
ToggleBookmarkshift control F11F11
CloseAllEditorsshift control F4|shift control Wnull
PreviousTabshift control F6|control alt RIGHT|control PAGE_UPalt LEFT
Diff.PrevChangeshift control F6|control alt RIGHT|control PAGE_UPalt LEFT
FindUsagesInFileshift control Gcontrol F7
XDebugger.Inspectshift control Inull
FindPreviousshift control Kshift F3|control shift L
EditorPreviousWordWithSelectionshift control LEFTcontrol shift LEFT
EditorMatchBraceshift control Pcontrol shift M
GotoFileshift control Rcontrol shift N
EditorNextWordWithSelectionshift control RIGHTcontrol shift RIGHT
CommentByBlockCommentshift control SLASHcontrol shift SLASH|control shift DIVIDE
QuickJavaDocshift control SPACE|F2control Q
GotoClassshift control Tcontrol N
GotoChangedFileshift control Tcontrol N
EditorToggleCaseshift control U|shift control X|shift control Ycontrol shift U
MethodUpshift control UPalt UP
GotoPreviousErrorshift F1shift F2
ExternalJavaDocshift F2shift F1
EditorIndentSelectionTABTAB
  • 16
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值