新电脑前端环境快速配置-win10

394 阅读2分钟

vscode

下载

  1. 找到浏览器下载任务,右键菜单,复制链接
- 原链接
https://`az764295.vo.msecnd.net`/stable/f1b07bd25dfad64b0167beb15359ae573aecd2cc/VSCodeUserSetup-x64-1.83.1.exe 

将'az764295.vo.msecnd.net'部分替换为`vscode.cdn.azure.cn`

- 替换后结果
https://`vscode.cdn.azure.cn`/stable/3866c3553be8b268c8a7f8c0482c0c0177aa8bfa/VSCode-darwin-arm64.zip

插件

  1. eslint
  2. volar
  3. Chinese (Simplified) Language Pack for Visual Studio Code
  4. Prettier-Code formatter
  • 快捷键 alt + shift + f
  • 或 ctrl + p -> 输入Format Document with Prettier

扩展

配置

vscode打开多个标签页面

  • Setting(设置)->Workbench › Editor: Enable Preview->取消勾选

设置Crtl + s 保存全部文件

  • 设置快捷键

关联git

  • 下面得到的地址,关联到vscode中
where git

配置默认终端为base

  • 设置 -> 搜索Shell:Windows -> 默认为null下拉选择Git Bash

jsconfig.json

  • 用来解决在vscode中webpack,vite,vue,react项目中alias别名@路径不能跳转的问题
  • 项目根目录下添加jsconfig.json文件,添加后重启vscode
{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["src/*"]
    },
    "target": "ES6",
    "allowSyntheticDefaultImports": true
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules"]
}

Git Bash

下载

配置

生成SSH密钥

ssh-keygen -t rsa -b 4096 -C "your_email@example.com" // 生成密钥

cat ~/.ssh/id_rsa.pub | clip // 复制到剪贴板(生成的密钥)

git clone需要添加上面生成的密钥到仓库(gitlab)

  • 你的代码仓库-> 头像-> 设置 -> SSH KEYS -> Add key

git push需配置全局用户名和邮箱

git config --global user.name "你的用户名" 
git config --global user.email "你的邮箱"

node 和 npm

下载

node官网下载

nvm下载

node

npm

  • 更换包安装源
npm config set registry https://registry.npmmirror.com // 设置
npm config get registry // 获取

python下载

Chrome浏览器

下载

插件

Postman

下载

配置

mock服务

搜狗五笔

配置

快捷键

  • 截图: ctrl + alt + c