问题描述
有没有办法做到这一点?我宁愿将代码换行并说出80-100个字符的行长.每当我滑动时,滚动就会使我发疯!
Is there a way to do this? I'd much rather have the code wrap and say within 80-100 character line lengths. The scroll over every time I swipe is driving me crazy!
推荐答案
IDE中具有自动换行" 功能-这样做-实际上(仅在屏幕上)中断了将该行分成多行以显示整个行,而无需水平滚动.
There is "soft wraps" functionality in IDE -- it does just that -- it virtually (on a screen only) breaks the line into multiple to show whole line without the need for horizontal scrolling.
可以在以下位置启用它:
It can be enabled at:
- 对于所有文件:
Settings/Preferences | Editor | General | Use soft wraps in editor
- 仅适用于当前文件:
View | Active Editor | Use Soft Wraps
- For all files:
Settings/Preferences | Editor | General | Use soft wraps in editor
- For current file only:
View | Active Editor | Use Soft Wraps
这些选项也可通过装订线上下文菜单(行号所在的区域)使用.如果您很久以前已自定义该上下文菜单,那么它们可能不存在(因为它们是立即添加到其中的).
These options are also available via gutter context menu (the area where the line numbers are). If you have customized that context menu long time ago ... then they may not be there (as they were added there straight away).
这篇关于在PhpStorm中禁用水平滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!