Vscode、Fleet配置备份

一些编辑器配置备份

VsCode(1.97+)

整体配置

除 Plugins 部分外,都是内置配置,不需要安装任何插件。

JSON
  1{
  2  // *****************************************************************
  3  // *****************************************************************
  4  // ************************ Vscode Start ***************************
  5  // *****************************************************************
  6  // *****************************************************************
  7  "workbench.colorTheme": "Quiet Light",
  8  "files.autoSave": "onFocusChange",
  9  // 字体,本机必须安装方可正常显示
 10  "editor.fontFamily": "'JetBrainsMono NF', 'HarmonyOS Sans SC', '霞鹜文楷'",
 11  // 编辑器字体大小和设置
 12  "editor.fontSize": 16,
 13  // 启用连字
 14  "editor.fontLigatures": true,
 15  // 行高
 16  "editor.lineHeight": 23,
 17  // 字间距
 18  "editor.letterSpacing": 0.5,
 19  // 自动显示空白字符(例如空格和 Tab),如果你有密集恐惧症,请恢复为默认配置 selection
 20  "editor.renderWhitespace": "all",
 21  // 保存时自动优化导入包
 22  "editor.codeActionsOnSave": {
 23    // 显示保存时触发
 24    "source.fixAll": "explicit",
 25    // 显式保存、窗口更改和焦点更改自动保存时都会触发
 26    "source.organizeImports": "always"
 27  },
 28  // 自动换行
 29  "editor.wordWrap": "on",
 30  // ########################### JavaScript/TypeScript ###########################
 31  // 启用或禁用在 VS Code 中重命名或移动文件时自动更新导入路径的功能。always:一直自动更新
 32  "javascript.updateImportsOnFileMove.enabled": "always",
 33  // 函数完成时自动加括号
 34  "javascript.suggest.completeFunctionCalls": true,
 35  "typescript.suggest.completeFunctionCalls": true,
 36  // ########################### markdown ###########################
 37  // markdown 代码片段建议
 38  "[markdown]": {
 39    "editor.quickSuggestions": {
 40      "comments": "off",
 41      "strings": "off",
 42      "other": "on"
 43    },
 44    "editor.defaultFormatter": "yzhang.markdown-all-in-one"
 45  },
 46  // ########################### 终端配置 ###########################
 47
 48  // 终端可使用 bash 列表,可以查看终端下拉列表,如果不想显示,置为 null 即可,比如 "PowerShell": null
 49  "terminal.integrated.profiles.windows": {
 50    "PowerShell": {
 51      "source": "PowerShell",
 52      "icon": "terminal-powershell"
 53    },
 54    "Command Prompt": {
 55      "path": [
 56        "${env:windir}\\Sysnative\\cmd.exe",
 57        "${env:windir}\\System32\\cmd.exe"
 58      ],
 59      "args": [],
 60      "icon": "terminal-cmd"
 61    },
 62    "Git Bash": {
 63      "source": "Git Bash",
 64      "icon": "git-branch"
 65    }
 66  },
 67  // windows 默认终端使用 git bash,如果是 linux 使用 "terminal.integrated.defaultProfile.linux" 配置
 68  "terminal.integrated.defaultProfile.windows": "Git Bash",
 69  // 终端光标样式
 70  "terminal.integrated.cursorStyle": "line",
 71  "terminal.integrated.cursorWidth": 2,
 72  // 终端光标是否闪烁
 73  "terminal.integrated.cursorBlinking": true,
 74  // 在终端中,选中内容自动复制到剪切板
 75  "terminal.integrated.copyOnSelection": true,
 76  // 终端字体大小
 77  "terminal.integrated.fontSize": 16,
 78  // 开启连字(需要字体支持)
 79  "terminal.integrated.fontLigatures.enabled": true,
 80  "terminal.integrated.fontFamily": "'JetBrainsMono NF', 'HarmonyOS Sans SC Medium'",
 81  // 按住 Ctrl 的同时通过鼠标滚轮放大、缩小终端
 82  // "terminal.integrated.mouseWheelZoom": true,
 83  // ########################### Git ###########################
 84  // Git 提交记录显示
 85  // 不显示 Github 头像
 86  "github.showAvatar": false,
 87  // 编辑器内不显示提交记录,太干扰写作
 88  // "git.blame.editorDecoration.enabled": true,
 89  "git.blame.editorDecoration.template": "${subject}, ${authorName} ${authorEmail} (${authorDateAgo})",
 90  // *****************************************************************
 91  // *****************************************************************
 92  // ************************ Vscode end *****************************
 93  // *****************************************************************
 94  // *****************************************************************
 95
 96
 97
 98  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 99  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
100  // ++++++++++++++++++++++++ Plugin start +++++++++++++++++++++++++++
101  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
102  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
103  // ########################### Markdown Preview Enhanced插件 ###########################
104  // 插件地址:https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced
105  "markdown-preview-enhanced.codeBlockTheme": "default.css",
106  "markdown-preview-enhanced.previewTheme": "vue.css",
107  "markdown-preview-enhanced.printBackground": true,
108  // ############################# Python 插件 #############################
109  // https://marketplace.visualstudio.com/items?itemName=ms-python.python
110  // 自动导入
111  "python.analysis.autoImportCompletions": true,
112  // 函数完成时自动加入括号
113  "python.analysis.completeFunctionParens": true,
114  // ############################# Rust crates 插件 #############################
115  // https://marketplace.visualstudio.com/items?itemName=serayuzgur.crates
116  // Cargo.toml 依赖查询使用北外语镜像地址
117  "crates.indexServerURL": "https://mirrors.bfsu.edu.cn/crates.io-index",
118  // ############################# Java #############################
119  // https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack
120  "java.configuration.runtimes": [
121    {
122      // 名称,随便起,多个的话必须唯一
123      "name": "graalvm-jdk-21",
124      // jdk 路径,配置环境变量的路径
125      "path": "D:\\software\\develop\\Java\\graalvm-jdk-21.0.2+13.1",
126      // 源码路径
127      "sources": "D:\\software\\develop\\Java\\graalvm-jdk-21.0.2+13.1\\lib\\src.zip",
128      "default": true,
129    },
130    {
131      // 名称,随便起,多个的话必须唯一
132      "name": "JavaSE-17",
133      // jdk 路径,配置环境变量的路径
134      "path": "/usr/lib/jvm/java-17-openjdk",
135      // 源码路径
136      "sources": "/usr/lib/jvm/java-17-openjdk/lib/src.zip",
137    },
138  ],
139  // java 文件自动组织导入的包
140  "java.saveActions.organizeImports": true,
141  // vscode 包结构展示效果 flat:平面;hierarchical:分层
142  "java.dependency.packagePresentation": "hierarchical",
143  // 不使用 gradle-wrapper.properties 的属性
144  "java.import.gradle.wrapper.enabled": false,
145  // 设置默认的 gradle 版本
146  "java.import.gradle.version": "8.5",
147  // 本地 gradle 路径
148  "java.import.gradle.home": "/home/xxx/software/gradle-8.5",
149  "java.import.gradle.java.home": "/usr/lib/jvm/java-17-openjdk",
150  // GRADLE_USER_HOME 路径
151  "java.import.gradle.user.home": "/home/xxx/software/gradle-repo/",
152  //  Maven 配置 settings.xml 路径
153  "java.configuration.maven.globalSettings": "/home/xxx/software/maven-3.9.8/conf/settings.xml",
154  // maven 执行文件路径
155  "maven.executable.path": "/home/xxx/software/maven-3.9.8/bin/",
156  // ########################### Draw.io Integration插件 ###########################
157  // https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio
158  // Draw.io Integration 配置:添加自定义字体选项、设置默认主题
159  "hediet.vscode-drawio.customFonts": [
160    "JetBrains Mono",
161    "Fira Code",
162    "HarmonyOS Sans SC Medium",
163    "霞鹜文楷"
164  ],
165  "hediet.vscode-drawio.theme": "Kennedy",
166  // ########################### fittencode 插件 ###########################
167  // https://marketplace.visualstudio.com/items?itemName=FittenTech.Fitten-Code
168  "fittencode.languagePreference.displayPreference": "zh-cn",
169  "fittencode.languagePreference.commentPreference": "zh-cn",
170  "fittencode.disableSpecificInlineCompletion.suffixes": "md",
171  // ########################### Vue - Official 插件 ###########################
172  // https://marketplace.visualstudio.com/items?itemName=vue.volar
173  // 响应式数据自动添加 .value
174  "vue.autoInsert.dotValue": true,
175  "[vue]": {
176    "editor.defaultFormatter": "Vue.volar",
177  },
178  // ########################### MDX 插件 ###########################
179  // https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx
180  "mdx.server.enable": true,
181  "[json]": {
182    "editor.defaultFormatter": "vscode.json-language-features"
183  },
184  "[mdx]": {
185    "editor.defaultFormatter": "unifiedjs.vscode-mdx"
186  },
187  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
188  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
189  // +++++++++++++++++++++++++ Plugin end ++++++++++++++++++++++++++++
190  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
191  // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
192}
点击展开查看更多

代码片段配置

JSON
 1// ####################### js ###########################
 2	"Print to annotation": {
 3		"prefix": "annotation",
 4		"body": [
 5			"/**",
 6			" * @author jhlz",
 7			" * @description: ${1}",
 8			" * @date: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
 9			" */"
10		],
11		"description": ""
12	},
13	// ################################## json ###############################
14	"package.json config": {
15		"scope": "json",
16		"prefix": "config",
17		"body": [
18			"\"config\": {",
19			"    \"commitizen\": {",
20			"        \"czConfig\": \"$0\"",
21			"    }",
22			"}",
23		],
24		"description": "czg 使用自定义的配置文件"
25	},
26	// ################################### md ###################################
27	"table generate": {
28		"scope": "markdown",
29		"prefix": "tb-md",
30		"body": [
31			"|$1|$2|",
32			"|--|--|",
33		],
34		"description": "table generate"
35	},
36// ########################################################
37// ######################### Java #########################
38// ########################################################
39{
40    "log info": {
41		"scope": "java",
42		"prefix": "logi",
43		"body": [
44			"log.info(\"$1\", $2)"
45		],
46		"description": "generator java log.info()"
47	},
48	"log error": {
49		"scope": "java",
50		"prefix": "loge",
51		"body": [
52			"log.error(\"$1\", $2)"
53		],
54		"description": "generator java log.error()"
55	},
56	"log debug": {
57		"scope": "java",
58		"prefix": "logd",
59		"body": [
60			"log.debug(\"$1\", $2)"
61		],
62		"description": "generator java log.debug()"
63	},
64	"java doc": {
65		"scope": "java",
66		"prefix": "jdoc",
67		"body": [
68			"/**",
69			" *",
70			" * @author ${1:user}",
71			" * @since 1.0.0",
72			" */"
73		],
74	"description": "generator java class basic info"
75	},
76}
点击展开查看更多

生成时间方式:@date ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}

Fleet

配置参见官网:https://www.jetbrains.com/help/fleet/settings.html#user-settings

JSON
 1{
 2    // 主题
 3    "theme": "dark_purple",
 4    // 字体大小
 5    "editor.fontSize": 16.0,
 6    // 保存时格式化文本
 7    "editor.formatOnSave": true,
 8    // 使用组合键键时显示所用组合键
 9    "showShortcuts": true,
10    // 快捷键映射,这里采用了 vscode 的
11    "keymap": "pc-vscode",
12
13    // ############# 终端配置 #############
14    "terminal.profiles": [
15        {
16            "program": "D:\\software\\Git\\bin\\bash.exe",
17            "args": [], // optional
18            "name": "git-bash" // optional
19        }
20    ],
21    // 终端:复制选中文本
22    "terminal.copyOnSelection": true,
23    // 终端字体大小
24    "terminal.fontSize": 15.0,
25
26    // ############# Java ##############
27    "maven.user.settings": [
28        {
29            "path": "D:\\xxx\\Java\\maven-3.9.8\\conf\\settings.xml"
30        }
31    ],
32    "java.runtimes": [
33        {
34            "path": "D:\\xxx\\Java\\jdk1.8.0_361"
35        }
36    ],
37}
点击展开查看更多

Neovim

BASH
 1set nocompatible            " 禁用与vi的兼容性
 2filetype on                 " 探测文件类型
 3filetype plugin on          " 按照文件类型加载插件
 4filetype indent on          " 按照文件类型设置缩进
 5syntax on                   " 打开语法高亮
 6set number                  " 显示行号
 7" set relativenumber          " 显示相对行号
 8set cursorline              " 高亮当前行
 9set shiftwidth=4            " 设置位移宽度为4
10set tabstop=4               " 设置缩进宽度为4
11set expandtab               " 将缩进替换为空格
12set nobackup                " 不生成backup文件
13set scrolloff=10            " 设置滚动时始终显示上下10行
14set nowrap                  " 禁止折行
15set incsearch               " 增量式搜索
16set ignorecase              " 搜索时大小写不敏感
17set smartcase               " 搜索时对首字母大小写敏感
18set showcmd                 " 显示键入的命令前缀
19set showmode                " 显示当前模式(插入、可视等)
20set showmatch               " 在搜索过程中显示匹配的单词
21set hlsearch                " 高亮搜索结果
22set history=1000            " 设置命令历史记录为1000
23set encoding=utf-8          " 设置编码方式为UTF-8
点击展开查看更多

VIM

BASH
 1" 文件编码
 2set encoding=utf-8
 3set fileencoding=utf-8
 4" 自动缩进
 5set autoindent
 6" 新行智能自动缩进
 7set smartindent
 8" 状态栏标尺
 9set ruler
10" 语法高亮 vim5 之后默认开启
11set syntax=on
12" Tab键的宽度
13set tabstop=4
14" 搜索忽略大小写
15set ignorecase
16" 高亮显示匹配的括号
17set showmatch
18" 总是显示行号
19set nu
20
21" 侦测文件类型
22filetype on
23
24" 状态行显示的内容(包括文件类型和解码)
25set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")}
26" 总是显示状态行
27set laststatus=2
28" 高亮搜索的文本
29set hlsearch
点击展开查看更多

版权声明

作者: 浮生一梦

链接: /posts/1/01/some-editor-configbak/

许可证: 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议

本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。

评论

开始搜索

输入关键词搜索文章内容

↑↓
ESC
⌘K 快捷键