How to set vertical rulers with Visual Studio Code
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](https://keepforyourself.com/wp-content/uploads/2021/07/vi_set_colorcolumn.png)
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](https://keepforyourself.com/wp-content/uploads/2021/07/rulers_settings.png)
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
Share this content: