跳至主要內容

配置

Emilia Zhen大约 6 分钟

永久关闭 Win10Defender

CMD 中复制:

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableAntiSpyware" /d 1 /t REG_DWORD /f

关闭后若想再开启: Win键+R,运行 regedit 打开注册表编辑器,定位到 HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender 这儿,删掉 DisableAntiSpyware这个键值即可。

My VSCode config

插件

插件作用备注
One Dark Pro主题-
Auto Close Tag自动闭合标签不用再安装了
Auto Complete Tag自动完成标签-
Auto Rename Tag自动更改标签不用再安装了 勾选 Linked Editing
Beautify在 js/JSON/css/sass/html 格式化不用再安装了
Better Comments更加人性化的注释-
Bracket Pair Colorizer括号对颜色区分不用再安装了 勾选 bracket Pair Colorization:Enabled
Can I use浏览器兼容性检查-
Code Spell Checker单词拼写检查-
CSS Peek悬停显示该标签的 CSS 样式属性失效
EditorConfig for VS Code用.editorconfig 文件中的设置覆盖用户工作区设置-
ESLint在 ECMAScript/JavaScript 代码中识别和报告模式匹配的工具-
Easy less解析 less 文件-
filesize显示文件的详细信息-
File Peek根据路劲字符串快速定位到文件-
Guides高亮缩进基准线不用再安装了 选 true/active : Guides:bracket Pairs
Git Blame在状态栏显示当行的 Git 信息-
HTML CSS SupportCSS 提示-
HTML SnippetsHTML 片段不再维护
jQuery Code SnippetsJQ 代码片段-
Live Server为静态页面动态页面实时重新加载-
open in browser在浏览器打开-
output Colorizer彩色输出信息-
Path Autocomplete路径自动完成不用再安装了
Path Intellisense路径自动完成-
Preview on Web Server在服务器上预览-
Sublime Text KeymapSublime 快捷键-
VeturVue 工具-
JavaScript (ES6) code snippetsES6 代码段-
Prettier - Code formater代码格式化-
Flutterflutter 环境-
Awesome Flutter Snippets快速生成常用的 Flutter 代码片段-
Markdown Preview Enhancedmarkdown 实时预览和生成其他格式-
Shader languages support for VS Codeglsl 文件语法高亮-
Material Icon Theme文件图标风格-

setting.json

{
  "workbench.colorTheme": "One Dark Pro",
  "workbench.iconTheme": "material-icon-theme",
  "files.autoSave": "off",
  "files.autoGuessEncoding": true,
  "emmet.includeLanguages": {
    // jsx的提示
    "javascript": "javascriptreact",
    "vue-html": "html",
    "vue": "html",
    "wxml": "html"
  },
  "vetur.experimental.templateInterpolationService": false,
  "editor.tabSize": 2,
  "editor.formatOnPaste": true,
  "editor.formatOnSave": true,
  "editor.fontSize": 14,
  "editor.fontLigatures": true,
  "editor.bracketPairColorization.enabled": true,
  "editor.accessibilitySupport": "off",
  "editor.linkedEditing": true,
  "editor.guides.bracketPairs": "active",
  "editor.fontFamily": "JetBrainsMono Nerd Font",
  "editor.tokenColorCustomizations": {
    "comments": {
      // "fontStyle": "bold",
      "foreground": "#638d76"
    }
  },
  "prettier.printWidth": 180,
  "prettier.tabWidth": 2,
  "prettier.useTabs": false,
  "prettier.semi": false,
  "prettier.singleQuote": true,
  "prettier.bracketSameLine": true,
  "prettier.arrowParens": "always",
  "prettier.requirePragma": false,
  "prettier.insertPragma": false,
  "prettier.htmlWhitespaceSensitivity": "ignore",
  "terminal.integrated.fontFamily": "JetBrainsMono Nerd Font",
  "markdown-preview-enhanced.previewTheme": "vue.css",
  "markdown-preview-enhanced.codeBlockTheme": "vue.css",
  "markdown-preview-enhanced.printBackground": true,
  "markdown-preview-enhanced.enableScriptExecution": true,
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[vue]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[scss]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[less]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[dart]": {
    "editor.defaultFormatter": "Dart-Code.dart-code",
    "editor.tabSize": 2,
    "editor.formatOnSave": true,
    "editor.formatOnType": true,
    "editor.rulers": [500],
    "editor.selectionHighlight": false,
    "editor.suggest.snippetsPreventQuickSuggestions": false,
    "editor.suggestSelection": "first",
    "editor.tabCompletion": "onlySnippets",
    "editor.wordBasedSuggestions": false,
    "editor.wordWrapColumn": 100000
  },
  "scss.format.enable": false,
  "dart.flutterSdkPath": "D:\\flutter",
  "better-comments.tags": [
    {
      "tag": "!",
      "color": "#FF2D00",
      "strikethrough": false,
      "underline": false,
      "backgroundColor": "transparent",
      "bold": false,
      "italic": false
    },
    {
      "tag": "?",
      "color": "#3498DB",
      "strikethrough": false,
      "underline": false,
      "backgroundColor": "transparent",
      "bold": false,
      "italic": false
    },
    {
      "tag": "//",
      "color": "#474747",
      "strikethrough": true,
      "underline": false,
      "backgroundColor": "transparent",
      "bold": false,
      "italic": false
    },
    {
      "tag": "todo",
      "color": "#FF8C00",
      "strikethrough": false,
      "underline": false,
      "backgroundColor": "transparent",
      "bold": false,
      "italic": false
    },
    {
      "tag": "*",
      "color": "#98C379",
      "strikethrough": false,
      "underline": false,
      "backgroundColor": "transparent",
      "bold": false,
      "italic": false
    }
  ]
}

虚拟机配置

  • 安装phpStudy.exe
  • 浏览器访问localhost测试是否安装完成
  • "其他选项菜单"-->php扩展及设置-->参数值设置-->date.timezone-->PRC
  • "其他选项菜单" --> "打开配置文件"-->"httpd.conf" --> 470行"vhosts.conf"删除#号注释
  • "其他选项菜单" --> "站点域名管理" -->更改域名和对应的目录 -->"添加" -->"保存设置并生成配置文件"
  • "其他选项菜单" --> "打开 hosts 文件" --> 127.0.0.1 www. .com
  • "其他选项菜单" --> "打开配置文件" --> "vhosts.conf" -->插入一下内容
Options indexes FollowSymLinks ExecCGI
DirectoryIndex index.html index.php

安装 LESS

安装Node

  1. 打开cmd
  2. 输入node -v 检查是否安装node.js
  3. 输入nmp -v 检查nmp是否安装
  4. 输入npm install less -g 在线全局安装
  5. 输入lessc -v 检查less是否安装 安装的目录在c:\users\Think\AppData\Roaming\npm\lessc
  6. 使用
  • 新建后缀名为.less的文件,在VSCodeWS中打开,VsCode需扩展Easy less
  • 命令行方法
    • 输入 cd "less.less的路径"
    • 输入dir /W win10输入 dir ../src
    • 输入 lessc less.less less.css

安装 Cmder

安装Node

  1. Cmder加到环境变量
  2. win+r输入cmder运行
  3. 输入Cmder.exe /REGISTER ALL
  4. 右键cmder here
  5. 防中文乱码,在设置中Startup->Environment中加入一行chcp utf8

Win7 右键增加打开 powershell 选项

  1. 打开regedit
  2. {HKEY_CLASSES_ROOT\Directory\Background\shell\cmd\command}
  3. cmd同级新建powershell,然后在powershell下建立command子文件夹
  4. 在该commandREG_SZ的值输入
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoExit Set-Location "%V"
  1. 如果不小心误操作删除了cmd的键值,那么可以用下面的键值恢复,cmdREG_SZ键值为
cmd.exe /s /k pushd "%V"
  1. 关闭注册表,shift+右键出现的菜单中可以看到powershell,在属性中更改颜色比例R1 G36 L86

Sublime Text3 主题设置

  1. 首选项Package ControlUpgrade All
  2. install theme lanzhou; theme agila;MarkdownEditing
  3. 首选项-插件设置-MarkdownEditing - default
{
  "color_scheme": "Packages/Boxy Theme/schemes/Boxy Monokai.tmTheme", // 修改风格的主题,我这里是sublime的boxy主题自带的,默认有这几种主题
  // "color_scheme": "Packages/MarkdownEditing/MarkdownEditor.tmTheme",
  // "color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Dark.tmTheme",
  // "color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Yellow.tmTheme",
  "highlight_line": true, // 高亮正在编辑的行
  "line_numbers": true, // 显示行号
  "tab_size": 4, // tab宽度
  "translate_tabs_to_spaces": true, // tab转换为空格
  "trim_trailing_white_space_on_save": true, // 保存时去掉行尾空格
  "word_wrap": true, // 自动换行
  "wrap_width": "auto", // 换行的宽度,默认80会造成左侧大量留白
  "mde.keep_centered": true
}

windows.Terminal

  1. 管理员身份下 set-ExecutionPolicy RemoteSigned
  2. 安装JetBrains Mono-regular字体
  3. 配置里选择以json编辑
{
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
    "copyOnSelect": false,
    "copyFormatting": false,
    "profiles":
    {
        "defaults":
        {
            // Put settings here that you want to apply to all profiles.
            "startingDirectory": ".",
            "font": {
              "face": "JetBrainsMono Nerd Font Mono",// "Cascadia Code"
              "size": 12
            },
            "useAcrylic": true,
            "opacity": 90,
            "colorScheme": "OneDark",
            "backgroundImageOpacity": 0.3,
            "backgroundImageStretchMode": "fill"
        },
    },
    "schemes": [{
        "name": "OneDark",
        "black": "#1e2127",
        "red": "#e06c75",
        "green": "#98c379",
        "yellow": "#d19a66",
        "blue": "#61afef",
        "purple": "#c678dd",
        "cyan": "#56b6c2",
        "white": "#abb2bf",
        "brightBlack": "#5c6370",
        "brightRed": "#e06c75",
        "brightGreen": "#98c379",
        "brightYellow": "#d19a66",
        "brightBlue": "#61afef",
        "brightPurple": "#c678dd",
        "brightCyan": "#56b6c2",
        "brightWhite": "#ffffff",
        "background": "#1e2127",
        "foreground": "#abb2bf"
    }],

        "list": [
      {
        // 键标记
        "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
        "name": "PowerShell Core 7",
        // 行为
        "closeOnExit": true,
        "commandline": "D:\\PowerShell\\7\\pwsh.exe -nologo",
        "hidden": false,
        "historySize": 9001,
        "snapOnInput": true,
        "startingDirectory": ".",
        // 外观
        "cursorColor": "#FFFFFF",
        "cursorShape": "bar",
        "padding": "5, 5, 20, 25",
        "useAcrylic": false
      },
            ….
    ]

    "actions":
    [
        // Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
        // These two lines additionally bind them to Ctrl+C and Ctrl+V.
        // To learn more about selection, visit https://aka.ms/terminal-selection
        { "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" },
        { "command": "paste", "keys": "ctrl+v" },
        // Press Ctrl+Shift+F to open the search box
        { "command": "find", "keys": "ctrl+shift+f" },
        // Press Alt+Shift+D to open a new pane.
        // - "split": "auto" makes this pane open in the direction that provides the most surface area.
        // - "splitMode": "duplicate" makes the new pane use the focused pane's profile.
        // To learn more about panes, visit https://aka.ms/terminal-panes
        { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" },
        // Creat new pane
        { "command": { "action": "splitPane", "split": "vertical"}, "keys": "ctrl+shift+plus"},
        { "command": { "action": "splitPane", "split": "horizontal"}, "keys": "ctrl+shift+-" },
        { "command": { "action": "splitPane", "split": "auto" }, "keys": "ctrl+shift+|" },
        { "command": "closeTab", "keys": "ctrl+w" }
    ]
}
  1. 安装样式插件on-my-posh
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://ohmyposh.dev/install.ps1'))
  1. 启动编辑powerShell配置文件引擎
notepad $Profile
# 若是找不到 `$Profile,执行以下指令来新增
New-Item -Path $PROFILE -Type File -Force
  1. 使用主题 查看主题open in new window
oh-my-posh init pwsh | Invoke-Expression
## 使用主题
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\xxxx主题名xxxx.omp.json" | Invoke-Expression
  1. 添加右键菜单 新建xx.reg文件
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
@="Windows Terminal Here"
"Icon"="wt_32.ico 的路径,要使用 \\ 做路径分隔"
[HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command]
@="C:\\Users\\你的用户名\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"