一些编辑器配置备份

VsCode(1.91+)

整体配置

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

settings.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
{
// *****************************************************************
// *****************************************************************
// ************************ Vscode start ***************************
// *****************************************************************
// *****************************************************************
// vscode 默认主题之一
"workbench.colorTheme": "Quiet Light",
// 焦点移动时自动保存文件内容
"files.autoSave": "onFocusChange",
// 设定毫秒后自动保存,必须设置 "files.autoSave": "afterDelay",否则该项无效
// "files.autoSaveDelay": 1000,
// 保存时自动格式化内容,"files.autoSave" 不能设置为 "afterDelay",否则该无效
// "editor.formatOnSave": true,
// 字体,本机必须安装方可正常显示
"editor.fontFamily": "'Fira Code', 'HarmonyOS Sans SC', '霞鹜文楷'",
// 编辑器字体大小和设置
"editor.fontSize": 16,
// 启用连字
"editor.fontLigatures": true,
// 行高
"editor.lineHeight": 23,
// 字间距
"editor.letterSpacing": 0.5,
// 自动显示空白字符(例如空格和 Tab),如果你有密集恐惧症,请恢复为默认配置 selection
"editor.renderWhitespace": "all",
// 保存时自动优化导入包
"editor.codeActionsOnSave": {
// 显式保存时触发
"source.fixAll": "explicit",
// 显式保存、窗口更改自动保存和焦点更改自动保存时都会触发
"source.organizeImports": "always"
},
// ########################### JavaScript/TypeScript ###########################
// 启用或禁用在 VS Code 中重命名或移动文件时自动更新导入路径的功能。always:一直自动更新
"javascript.updateImportsOnFileMove.enabled": "always",
// 函数完成时自动加括号
"javascript.suggest.completeFunctionCalls": true,
"typescript.suggest.completeFunctionCalls": true,
// ########################### markdown ###########################
// markdown 代码片段建议
"[markdown]": {
"editor.quickSuggestions": {
"comments": "off",
"strings": "off",
"other": "on"
},
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
},
// ########################### 终端配置 ###########################
// 终端光标样式
"terminal.integrated.cursorStyle": "line",
"terminal.integrated.cursorWidth": 2,
// 终端光标是否闪烁
"terminal.integrated.cursorBlinking": true,
// 终端可使用 bash 列表,可以查看终端下拉列表,如果不想显示,置为 null 即可,比如 "PowerShell": null
// Linux 使用 "terminal.integrated.profiles.linux"
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash",
"icon": "git-branch"
}
},
// windows 默认终端使用 git bash,如果是 linux 使用 "terminal.integrated.defaultProfile.linux" 配置
"terminal.integrated.defaultProfile.windows": "Git Bash",
// 在终端中,选中内容自动复制到剪切板
"terminal.integrated.copyOnSelection": true,
// 终端使用的字体和字体大小
"terminal.integrated.fontSize": 16,
"terminal.integrated.fontFamily": "'JetBrainsMono NF', 'HarmonyOS Sans SC Medium'",
// 按住 Ctrl 的同时通过鼠标滚轮放大、缩小终端
// "terminal.integrated.mouseWheelZoom": true,
// 图形化显示版本控制的历史提交记录
"scm.experimental.showHistoryGraph": true,
// *****************************************************************
// *****************************************************************
// ************************ Vscode end *****************************
// *****************************************************************
// *****************************************************************



// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++ Plugin start +++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ########################### Markdown Preview Enhanced插件 ###########################
// 插件地址:https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced
"markdown-preview-enhanced.codeBlockTheme": "default.css",
"markdown-preview-enhanced.previewTheme": "vue.css",
"markdown-preview-enhanced.printBackground": true,
// ############################# Python 插件 #############################
// https://marketplace.visualstudio.com/items?itemName=ms-python.python
// 自动导入
"python.analysis.autoImportCompletions": true,
// 函数完成时自动加入括号
"python.analysis.completeFunctionParens": true,
// ############################# Rust crates 插件 #############################
// https://marketplace.visualstudio.com/items?itemName=serayuzgur.crates
// Cargo.toml 依赖查询使用北外语镜像地址
"crates.indexServerURL": "https://mirrors.bfsu.edu.cn/crates.io-index",
// ############################# Java #############################
// https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack
"java.configuration.runtimes": [
{
// 名称,随便起,多个的话必须唯一
"name": "graalvm-jdk-21",
// jdk 路径,配置环境变量的路径
"path": "D:\\software\\develop\\Java\\graalvm-jdk-21.0.2+13.1",
// 源码路径
"sources": "D:\\software\\develop\\Java\\graalvm-jdk-21.0.2+13.1\\lib\\src.zip",
"default": true,
},
{
// 名称,随便起,多个的话必须唯一
"name": "JavaSE-17",
// jdk 路径,配置环境变量的路径
"path": "/usr/lib/jvm/java-17-openjdk",
// 源码路径
"sources": "/usr/lib/jvm/java-17-openjdk/lib/src.zip",
"default": true,
},
],
// java 文件自动组织导入的包
"java.saveActions.organizeImports": true,
// vscode 包结构展示效果 flat:平面;hierarchical:分层
"java.dependency.packagePresentation": "hierarchical",
// 不使用 gradle-wrapper.properties 的属性
"java.import.gradle.wrapper.enabled": false,
// 设置默认的 gradle 版本
"java.import.gradle.version": "8.5",
// 本地 gradle 路径
"java.import.gradle.home": "/home/xxx/software/gradle-8.5",
"java.import.gradle.java.home": "/usr/lib/jvm/java-17-openjdk",
// GRADLE_USER_HOME 路径
"java.import.gradle.user.home": "/home/xxx/software/gradle-repo/",
// Maven 配置 settings.xml 路径
"java.configuration.maven.globalSettings": "/home/xxx/software/maven-3.9.8/conf/settings.xml",
// maven 执行文件路径
"maven.executable.path": "/home/xxx/software/maven-3.9.8/bin/",
// ########################### Draw.io Integration插件 ###########################
// https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio
// Draw.io Integration 配置:添加自定义字体选项、设置默认主题
"hediet.vscode-drawio.customFonts": [
"JetBrains Mono",
"Fira Code",
"HarmonyOS Sans SC Medium",
"霞鹜文楷"
],
"hediet.vscode-drawio.theme": "Kennedy",
// ########################### picgo 插件 ###########################
// https://marketplace.visualstudio.com/items?itemName=Spades.vs-picgo
// 只使用 VsCode PicGo 插件,需要配置以下信息
"picgo.picBed.current": "github",
"picgo.picBed.uploader": "github",
// 仓库
"picgo.picBed.github.repo": "username/repo",
// 分支
"picgo.picBed.github.branch": "main",
// token
"picgo.picBed.github.token": "xxxx",
// 自定义返回的链接
"picgo.picBed.github.customUrl": "xxxxx",
// 上传路径
"picgo.picBed.github.path": "xxxx",
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++ Plugin end ++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
}

代码片段配置

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

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

Fleet

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

settings.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
// 主题
"theme": "dark_purple",
// 字体大小
"editor.fontSize": 16.0,
// 保存时格式化文本
"editor.formatOnSave": true,
// 使用组合键键时显示所用组合键
"showShortcuts": true,
// 快捷键映射,这里采用了 vscode 的
"keymap": "pc-vscode",

// ############# 终端配置 #############
"terminal.profiles": [
{
"program": "D:\\software\\Git\\bin\\bash.exe",
"args": [], // optional
"name": "git-bash" // optional
}
],
// 终端:复制选中文本
"terminal.copyOnSelection": true,
// 终端字体大小
"terminal.fontSize": 15.0,

// ############# Java ##############
"maven.user.settings": [
{
"path": "D:\\xxx\\Java\\maven-3.9.8\\conf\\settings.xml"
}
],
"java.runtimes": [
{
"path": "D:\\xxx\\Java\\jdk1.8.0_361"
}
],
}

Neovim

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

VIM

/etc/vim/vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
" 文件编码
set encoding=utf-8
set fileencoding=utf-8
" 自动缩进
set autoindent
" 新行智能自动缩进
set smartindent
" 状态栏标尺
set ruler
" 语法高亮 vim5 之后默认开启
set syntax=on
" Tab键的宽度
set tabstop=4
" 搜索忽略大小写
set ignorecase
" 高亮显示匹配的括号
set showmatch
" 总是显示行号
set nu

" 侦测文件类型
filetype on

" 状态行显示的内容(包括文件类型和解码)
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")}
" 总是显示状态行
set laststatus=2
" 高亮搜索的文本
set hlsearch

本站由 江湖浪子 使用 Stellar 1.29.1 主题创建。
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议,转载请注明出处。