How to make ruler always be shown in Sublime text 2?

前端 未结 7 1259
无人及你
无人及你 2020-12-22 17:12

I use Sublime Text 2 and want a Ruler to be shown in every file with specific line-height. But I have to show it manually in every file.

相关标签:
7条回答
  • 2020-12-22 17:58

    As others have stated before me, select Preferences -> Settings-User and change

    "rulers": [],

    to

    "rulers": [80],

    in order to display one ruler at column 80.

    Now for the rub, it seems that one must use a monospaced font in order to display rulers so you'll also need to change

    "font_face": "",

    to

    "font_face": "Monospace",

    or any other monospaced font.

    Thinking about it, this makes sense. If different characters have different widths, then the ruler could potentially not be a single line, but a bunch of annoying line segments. I noticed this while using the default font and my column numbers were not the same for the same vertical position. At the same time, my fancy ruler was specified but not displayed. Changing the font to Monospace solved both problems.

    0 讨论(0)
提交回复
热议问题