IDEA、VS-Code、Maven、Git、npm必备配置技巧

一、IDEA

1. Live Template

  • 字段注释

**
 * 
 */
  • 方法模板注释

**
 * 
$param$ $return$ 
 * @author zoes
 * @date $date$ $time$
 */
return Variables
____________________________
groovyScript("if(\"${_1}\" == 'void'){def result = ''} else { def returnType = \"${_1}\"; def result = '\\r\\n * @return ' + returnType; return result;}", methodReturnType());
param Variables
____________________________
groovyScript("def result=''; def params=\"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList(); for(i = 0; i < params.size(); i++) {result+=' * @param ' + params[i] + ((i < params.size() - 1) ? '\\r\\n' : '')}; return result", methodParameters())
  • 异常捕获

try{
    $END$
}catch (Exception e){
    
}
  •  Switch匹配

switch($END$){
    case :
        break;
    default:
        break;
}

        $END$ 可指定光标位置

  • 代办 TODO

//Zoes TODO $date$:

2. File and Code Templates

  • Class

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
/**
 * @Author: Zoes
 * @Date: ${DATE} ${TIME}
 * @Description: ${DESCRIPTION}
 * @Version 1.0.0
 */
public class ${NAME} {
}
  • Interface

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
/**
 * @Author: Zoes
 * @Date: ${DATE} ${TIME}
 * @Description: ${DESCRIPTION}
 * @Version 1.0.0
 */
public interface ${NAME} {
}
  • Enum

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")

/**
 * @Author: Zoes
 * @Date: ${DATE} ${TIME}
 * @Description: ${DESCRIPTION}
 * @Version: 1.0.0
 */
public enum ${NAME} {
}

3.插件

        3.1. Translation

        3.2. AiXcoder

        3.3. Gitee

        3.4. MybatisX

        3.5. EasyJavaDoc

                3.5.1. EasyDocClassTemplate

/**
 * Description: $DOC$
 * Author: <a href="">$AUTHOR$</a>
 * Date: $DATE$	
 */
                3.5.2. EasyDocMethodTemplate
/**
* @Description $DOC$ 
* @Params $PARAMS$ 
* @Return $RETURN$ 
* @Throws $THROWS$ 
*/

3.6. 通义灵码

3.7. SonarLint 代码扫描插件

二、VsCode

    必备插件

  • Git History                                      Git历史记录            

  • Local History                                  本地历史记录

  • Vue - Official                                   Vue语法高亮

  • IntelliJ IDEA Keybindings             IDEA快捷键·

  • Bookmark                                       书签

  • FittenCode                                      代码提示

  • TODO Highlight                              Todo备注

                

三、npn管理

1、npm配置代理

#查看npm代理
npm config get proxy
npm config get https-proxy

#配置npm代理
npm config set proxy http://127.0.0.1:8080
npm config set https-proxy http://127.0.0.1:8080


#设置代理为空
npm config set proxy null
npm config set https-proxy null

#npm清理缓存
npm cache clean --force;

#相关配置
#暂时关闭SSL证书验证(不推荐,因为这会降低你的网络安全性)
npm config set strict-ssl false
npm config set strict-ssl true
#插件安装
"sa-sdk-javascript": "^1.25.12",
npm install sa-sdk-javascript@1.25.12 --save
"crypto-js": "^4.1.1",
npm install crypto-js@4.1.1 --save

2、npm配置镜像源

#查看当前源:
npm get registry
#恢复默认官方源:
npm config set registry https://registry.npmjs.org/
#淘宝源(旧):
npm config set registry https://registry.npm.taobao.org/
npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass
#阿里巴巴维护的新镜像源(新):
npm config set registry https://registry.npmmirror.com

3、nvm版本管理

https://github.com/coreybutler/nvm-windows/releases
查看可以安装的nodejs版本:nvm list available
指定安装nodejs版本 :nvm install 版本号
查看已经下载的nodejs版本:nvm ls
使用安装的nodejs版本:nvm use 版本号

四、Maven管理

        maven包下配置文件

<mirror>
  <id>xxx Maven2</id>
  <mirrorOf>central</mirrorOf>
  <name>Nexus Mirror</name>
  <url>http://repos.xxx.com/repository</url>
</mirror>
<mirror>
  <id>xxx Maven3</id>
  <mirrorOf>central3</mirrorOf>
  <name>Nexus Mirror2</name>
  <url>https://maven.aliyun.com/repository/central</url>
</mirror>

五、Git管理

#查看Git配置信息
git config --list

#修改Git提交用户名
git config --global user.name  "张三丰"

#修改Git邮箱
git config --global user.email "zsf@qq.com"

#查看代理:
git config --global --get http.proxy
git config --global --get https.proxy

#取消代理的命令:
git config --global --unset http.proxy
git config --global --unset https.proxy

#配置代理
git config --global http.proxy  'http://127.0.0.1:0000' 
git config --global https.proxy 'http://127.0.0.1:0000'

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli 'E:\\web_study\\node\\nodejs\\node.exe', 1 verbose cli 'E:\\web_study\\node\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'build' 1 verbose cli ] 2 info using npm@6.14.5 3 info using node@v14.5.0 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] 5 info lifecycle vue-antd-jeecg@3.4.3~prebuild: vue-antd-jeecg@3.4.3 6 info lifecycle vue-antd-jeecg@3.4.3~build: vue-antd-jeecg@3.4.3 7 verbose lifecycle vue-antd-jeecg@3.4.3~build: unsafe-perm in lifecycle true 8 verbose lifecycle vue-antd-jeecg@3.4.3~build: PATH: E:\web_study\node\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\java-study-item\jeecgboot-vue2\ant-design-vue-jeecg\node_modules\.bin;E:\Software\MySQL\mysql-8.0.26-winx64\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;E:\web_study\node\nodejs;E:\Git\Git-install\Git\cmd;E:\linux\tools\xshell\;E:\linux\tools\xftp\;E:\Developer\Developer_tools\java\jdk1.8.0_211\bin;C:\Users\SHUAIGE\AppData\Local\Microsoft\WindowsApps;E:\web_study\html\cvcode\Microsoft VS Code\bin;E:\maven\apache-maven-3.8.4\bin;E:\Software\idea\Installation package\IntelliJ IDEA 2020.3.1\bin;;C:\Users\SHUAIGE\AppData\Roaming\npm;E:\web_study\node\nodejs;D:\软件下载\bandizip\ 9 verbose lifecycle vue-antd-jeecg@3.4.3~build: CWD: E:\java-study-item\jeecgboot-vue2\ant-design-vue-jeecg 10 silly lifecycle vue-antd-jeecg@3.4.3~build: Args: [ '/d /s /c', 'vue-cli-service build' ] 11 silly lifecycle vue-antd-jeecg@3.4.3~build: Returned: code: 1 signal: null 12 info lifecycle vue-antd-jeecg@3.4.3~build: Failed to exec build script 13 verbose stack Error: vue-antd-jeecg@3.4.3 build: `vue-cli-service build` 13
最新发布
03-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值