简体   繁体   English

VS Code 换行或换行

[英]VS Code line break or wrap

When I write code in Visual Studio Code, and the line gets long, It doesn't break.当我在 Visual Studio Code 中编写代码并且行变长时,它不会中断。 It goes past the edge of the screen and that is rather annoying.它越过屏幕边缘,这很烦人。 What I want is for the line to break and then go on below, I believe this is called wrap or breaking I'm not sure.我想要的是断线然后在下面继续,我相信这被称为换行或断线,我不确定。 I use a split screen on my computer so only one half is my code editor and the other half is my project so I can see as I update it.我在我的电脑上使用分屏,所以只有一半是我的代码编辑器,另一半是我的项目,所以我可以在更新时看到它。 Any help?有什么帮助吗?

There's a setting for that called editor.wordWrap .有一个名为editor.wordWrap的设置。

You can search the settings for "wrap" and set some additional customization to how you want VSCode to behave when wrapping text.您可以搜索“换行”的设置,并根据您希望 VSCode 在换行时的行为方式设置一些额外的自定义。

Ctrl+Shift+P to open command palette and type wrap there. Ctrl+Shift+P打开命令面板并在那里输入wrap You will easily find the option and also its hotkey - Alt+Z .您将轻松找到该选项及其热键 - Alt+Z

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 vs代码在引号中换行多行 - vs code wrap multiple line in quote 包装单引号并用正则表达式替换换行符 - Wrap single quotes and replace line break by regex 在 JavaScript 中添加换行符或换行符无法按预期工作 - Adding a line break or line-wrap in JavaScript not working as anticipated 制作带有多个<a>标签的面包屑分词并换行</a> - Make breadcrumbs with multiple <a> tags word break and wrap to another line 将javascript一行代码破解为可读代码 - break javascript one line code to readable code Babel 如何在代码中添加新行或换行符? - Babel how to add new line or line break to code? 来自api响应的字符串不能显示断线,但硬代码字符串可以显示断线 - String from api response cant display break line, but hard code string can display break line 为什么VS Code在Promise中的Reject上处理的异常中断? - Why does VS Code break on handled exception from Reject in Promise? 如何在不破坏javascript代码的情况下用javascript字符串换行? - how to give a line break with the javascript string without breaking javascript code? 如何打破一个字符串,使其不在我的源代码中的一行中? - How to break a string so it is not all in one line in my source code?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM