IDE优化

本文最后更新于:2024年6月21日 凌晨

IDEA

设置Maven国内阿里镜像

  1. 右键项目,选择Maven→Open ‘settings.xml’

image-20230626133235011

  1. 在settings.xml文件中增加阿里云镜像地址,代码如下:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

    <mirrors>
    <mirror>
        <id>alimaven</id>
        <mirrorOf>central</mirrorOf>
        <name>aliyun maven</name>
        <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
    </mirror>

    </mirrors>
</settings>
  1. 在pom.xml文件上右击,选择Maven→Reimport

image-20230626133344412

tips

  1. maven 的的全局配置默认路径是C:\Users[当前用户].m2\settings.xml
  2. maven的配置路径可以在settings中的maven中修改

设置类注释

例如下面的样式:

/**
 * @Author: wjwang
 * @description:
 * @date: 2023-09-08 21:54
 */

进入IDEA在 File => Settings => Editor => File and Code Templates,选择includes,加入一下内容:

image-20230922175334728

/**
 * @author ${USER}
 * @description ${description}
 * @date ${DATE} ${HOUR}:${MINUTE}:${SECOND}
 */

VScode

导入设置

管理→设置→打开设置

{
    "files.autoSave": "afterDelay",
    "files.autoGuessEncoding": true,
    "workbench.list.smoothScrolling": true,
    "editor.cursorSmoothCaretAnimation": "on",
    "editor.smoothScrolling": true,
    "editor.cursorBlinking": "smooth",
    "editor.mouseWheelZoom": true,
    "editor.formatOnPaste": true,
    "editor.formatOnType": true,
    "editor.formatOnSave": true,
    "editor.wordWrap": "on",
    "editor.guides.bracketPairs": true,
    //"editor.bracketPairColorization.enabled": true, (此设置vscode在较新版本已默认开启)
    "editor.suggest.snippetsPreventQuickSuggestions": false,
    "editor.acceptSuggestionOnEnter": "smart",
    "editor.suggestSelection": "recentlyUsed",
    "window.dialogStyle": "custom",
    "debug.showBreakpointsInOverviewRuler": true,
    "editor.fontSize": 18,
    "liveServer.settings.donotShowInfoMsg": true,
    "workbench.iconTheme": "vscode-icons",
    "explorer.confirmDelete": false,
    "workbench.startupEditor": "none",
}

IDE优化
https://junyyds.top/2023/06/26/IDE优化/
作者
Phils
发布于
2023年6月26日
更新于
2024年6月21日
许可协议