How to set vertical rulers with Visual Studio Code

set vertical rulers with Visual Studio Code

How to set vertical rulers with Visual Studio Code

Views: 27
0 0
Read Time:52 Second

In this small how to we are going to see How to set vertical rulers with Visual Studio Code.

I know that can sounds crazy but I actually spent time looking for this setting…is not that easy to find. In VI you can just do

:set colorcolumn=80,120,140                                                                                                                           

And by magic for each line you will write this will appear

vi_set_colorcolumn How to set vertical rulers with Visual Studio Code

With Visual Studio Code I found this to be not so immediate. In fact you should go to

Preferences -> Settings -> Text Editor and look for Rulers

OR

Use the Search settings at the top and type rulers

rulers_settings How to set vertical rulers with Visual Studio Code

Click on “Edit in settings.json”

and in the “editor.rulers”: [] you should write 80, 120 and the result should be something like this

 "editor.rulers": [
        80, 120
    ]

What this will do is that will add 2 vertical lines, one at the 80th column and the other at the 120th column

You can decide to add more if needed and at the size you prefer.

I hope you found this useful

happy How to set vertical rulers with Visual Studio Code
Happy
0 %
sad How to set vertical rulers with Visual Studio Code
Sad
0 %
excited How to set vertical rulers with Visual Studio Code
Excited
0 %
sleepy How to set vertical rulers with Visual Studio Code
Sleepy
0 %
angry How to set vertical rulers with Visual Studio Code
Angry
0 %
surprise How to set vertical rulers with Visual Studio Code
Surprise
0 %

Share this content:

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x