Java 向 IntelliJ 中的编辑器添加列指南

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3480826/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-14 01:10:17  来源:igfitidea点击:

Adding a column guideline to the editor in IntelliJ

javaintellij-idea

提问by popopome

I'd like to use column guide line to IntelliJ IDE. Anybody knows about this? I couldn't find any solution for the feature?

我想使用 IntelliJ IDE 的列指南。有人知道这件事吗?我找不到该功能的任何解决方案?

For example: Visual Studio with column guideline

例如: 带有列指南的 Visual Studio

采纳答案by Roman

If I understand correctly what you're trying to configure, then you need:

如果我正确理解您要配置的内容,那么您需要:

Go to IDE Settings -> Editor Settings -> Appearance -> Tick Show right margin.

转到 IDE 设置 -> 编辑器设置 -> 外观 -> 勾选Show right margin

回答by ranma2913

I use Idea 12. You can find the settings here: First go to:

我使用 Idea 12。你可以在这里找到设置:首先去:

  • File > Settings > IDE Settings > Editor > Appearance
  • Verify that "Show right Margin" is checked.
  • 文件 > 设置 > IDE 设置 > 编辑器 > 外观
  • 验证是否选中了“显示右边距”。

Now go to:

现在去:

  • File > Settings > Project Settings > Code Style > General
  • Select your project's Scheme and then the right margin character size.
  • From this page you can auto wrap or switch to using the tab character vs. the 4 spaces for indents.
  • 文件 > 设置 > 项目设置 > 代码样式 > 常规
  • 选择您项目的方案,然后选择右边距字符大小。
  • 在此页面中,您可以自动换行或切换到使用制表符与 4 个空格进行缩进。

Hope this helps

希望这可以帮助

回答by prayagupd

In Intellj idea 13,

在 Intellj 的想法 13 中

STEP 1 :
Goto File-> Settings > Code style > General

第 1
转到文件-> 设置> 代码样式> 常规

intellij 13 column width

智能 13 列宽

STEP 2 :Change Right margin (columns)label

第 2 步:更改右边距(列)标签

STEP 3 :Check on Wrap when typing reaches right margin.

第 3步:当打字到达右边距时检查Wrap。

STEP 4 :Goto Editor-> Appearance, check on 4th label(Show right margin)

第 4转到编辑器-> 外观,检查第 4 个标签显示右边距

show margin

显示边距

output

输出

enter image description here

在此处输入图片说明