Vertical rulers in Visual Studio Code

后端 未结 7 1626
盖世英雄少女心
盖世英雄少女心 2020-11-28 16:54

How can vertical rulers (note the plural) be configured in Visual Studio Code?

In Sublime Text 2 I can do

\"rulers\": [72, 80, 100, 120]
         


        
7条回答
  •  南方客
    南方客 (楼主)
    2020-11-28 17:42

    Visual Studio Code: Version 1.14.2 (1.14.2)

    1. Press Shift + Command + P to open panel
      • For non-macOS users, press Ctrl+P
    2. Enter "settings.json" to open setting files.
    3. At default setting, you can see this:

      // Columns at which to show vertical rulers
      "editor.rulers": [],
      

      This means the empty array won't show the vertical rulers.

    4. At right window "user setting", add the following:

      "editor.rulers": [140]

    Save the file, and you will see the rulers.

提交回复
热议问题