- Instant help with your Developer coding problems

Add vertical rulers in VS Code

Question:
How to add vertical rulers in VS Code?
Answer:
"editor.rulers": [80,120]

// Or with colors

"editor.rulers": [
	{ "column": 80, "color": "#555555" },
	{ "column": 120, "color": "#ff0000" },
]
Description:

Vertical rulers or guides help to follow coding conventions related to line length. Visual Studio Code supports rulers, and you can even set multiple rulers with different colors.

File -> Preferences -> Settings -> Text Editor -> Rulers click the Edit in settings.json and list all positions where you want a ruler to be displayed:

"editor.rulers": [80,120]

If you want to define different colors for each ruler you can do this as well.

 

Share "How to add vertical rulers in VS Code?"