首页 / 知识

如何在IntelliJ中永久启用行号?

2023-04-12 08:56:00

How can I permanently enable line numbers in IntelliJ?

如何在IntelliJ IDEA中永久启用行号?


IntelliJ 14.X以上

从版本14.0开始,设置对话框的路径略有不同,在编辑器和外观之间添加了一个常规子菜单,如下所示

enter image description here

IntelliJ 8.1.2 - 13.X

从IntelliJ 8.1.2开始,此选项位于File |中设置1。在该对话框的IDE Settings部分中,您可以在Editor |下找到它出现。

  • 在Mac上,这些名为IntelliJ IDEA |首选项...
  • enter image description here


    问题显然已经得到了很好的回答,但是从IJ 13开始,您可以在2秒内启用行号:

  • 按两次shift
  • 输入"行号"
  • 该选项显示在菜单中,然后按enter启用/禁用。
  • enter image description here

    瞧瞧;)


    有另一种方式,甚至更快(在10.5版本中适用于我)

    只需右键单击行号所在的位置,您就会看到一个小菜单。

    然后,标记"显示行号"选项。

    enter image description here

    请注意,这仅适用于每个文件。请享用。


    在Intellij 13中,布局已更改,"设置"按钮只能在"文件" - >"设置"中找到,而不能在工具栏中找到,并从那里执行相同的步骤:编辑器 - >外观 - >显示行号,或搜索行号在"设置"搜索输入中。Intellij Settings search for line numbers


    Android Studio 1.3.2及更高版本,IntelliJ 15及更高版本

    全局配置

    文件 - >设置 - >编辑器 - >常规 - >外观 - >显示行号

    enter image description here



    当前编辑器配置

    第一种方式:查看 - >活动编辑器 - >显示行号(此选项仅在您之前单击活动编辑器的文件时可用)

    第二种方法:右键单击项目结构和活动编辑器之间的小区域(即可以设置断点的区域) - >显示行号。
    enter image description here


    适用于InteliJ IDEA 11.0及以上版本
    转到文件 - >设置窗口编辑器中的设置 - >外观
    并勾选显示行号复选框。

    enter image description here


    IntelliJ 14(Ubuntu):

    请参阅:how-do-i-turn-on-line-numbers-permanent-in-intellij-14

    永久:

    文件>设置>编辑器>常规>外观>显示行号

    Editor

    对于当前的编辑:

    查看>活动编辑器>显示行号

    Menu


    IntelliJ IDEA 15

    5种方法

    全球变化

  • 文件>设置...>编辑器>常规>外观>显示行号

    show line numbers

  • 点击Shift两次>写"行号">显示行号(具有切换的行号)>将切换更改为ON

    shift shift

  • 更改活动编辑器

  • 右键单击左侧栏>显示行号

    right click

  • 点击Shift两次>写"line">显示行号(该行没有切换)

    shift shift line

  • Ctrl + Shift + A>写"显示行">活动编辑器:显示行号>将切换更改为ON

    Ctrl Shift A


  • 在使用Mac版本的intelliJ 14 Ultimate中,这就是它。

    IntelliJ Idea > Preferences > Editor > General > Appearance > Show Line Numbers


    在MAC OSX上的IntelliJ 12上,我很难找到它。搜索不会出于某种原因告诉我。转到"首选项",然后在"IDE设置","编辑器","外观"下选择"显示行号"

    enter image description here


    Android Studio

    转到Android Studio => Preferences => Editor => General => Appearance => set Checked"Show line numbers"

    enter image description here


    我刚刚安装了IdeaVim插件,即使我设置了Show Line Numbers,它仍然会恢复隐藏它们。

    (前额拍打价值)解决方案是:

    1
    :set nu

    对于9.0.4

    文件>设置

    在树视图组中

    ------------ IDE设置---------

    单击编辑器[+]

    选择外观...它在那里。


    第一种方式:转到View => Active Editor =>显示行号

    enter image description here

    第二种方式转到Android Studio =>首选项=>编辑器=>外观=>设置选中"显示行号"

    enter image description here

    enter image description here


    在Mac Intellij 12.1.2上没有文件设置:

    "文件"左侧有一个应用程序名称菜单项,带有"首选项"菜单项:

    Choosing

    在其中是Windows Intellij显示的"设置"对话框。


    在IntelliJ 14中,它再次在菜单上移动了一些。

    现在我们得到它Editor -> General -> Appearance

    enter image description here


    我为IntelliJ IDEA 2018.2添加了这个响应 - Ultimate。

    使用菜单

    IntelliJ Idea>首选项>编辑器>常规>外观>显示行号

    enter image description here

    使用快捷方式 - 第一种方式

    对于Windows:Ctrl + Shift + a
    对于Mac:Cmd + shift + a

    enter image description here

    使用快捷方式 - Seconde方式

    触摸Shift两次

    enter image description here

    自Intellij的最后4个版本以来存在这三种方法,我认为它们长期保持有效。


    只是Windows上Android Studio 1.5.1的更新:

    转到文件 - >设置 - >关注图片
    enter image description here


    IntelliJ IDEA 2016.1.2

    转到设置>编辑器>常规>外观
    然后选中显示行号选项

    enter image description here


    启用设置编辑器路径

    最新内容

    相关内容

    热门文章

    推荐文章

    标签云

    猜你喜欢