目录
[Ctrl d 会把当前行复制到下一行](#Ctrl d 会把当前行复制到下一行)
目录
[Ctrl d 会把当前行复制到下一行](#Ctrl d 会把当前行复制到下一行)
[使用VS Code设置换行](#使用VS Code设置换行)
Ctrl d 会把当前行复制到下一行
步骤1:打开键绑定设置
- 打开 VS Code。
- 按
Ctrl+Shift+P
打开命令面板。 - 输入并选择
Preferences: Open Keyboard Shortcuts (JSON)
。
{ "key": "ctrl+d", "command": "editor.action.copyLinesDownAction", "when": "editorTextFocus" }, // 其他键绑定配置...
使用VS Code设置换行
-
打开设置:
- 通过快捷键
Ctrl + ,
(Windows/Linux)或Cmd + ,
(Mac)打开设置。 - 或者点击左下角的齿轮图标,然后选择"Settings"。
- 通过快捷键
-
搜索并设置"Editor: Word Wrap Column":
在设置搜索栏中输入
word wrap column
,然后设置Editor: Word Wrap Column
的值为 200。例如:
json复制代码
"editor.wordWrapColumn": 200
这会将编辑器的自动换行列宽设置为200。
-
启用自动换行:
搜索
word wrap
并将Editor: Word Wrap
设置为bounded
。例如:
json复制代码
"editor.wordWrap": "bounded"
这会在列宽达到200字符时自动换行。