Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>SmartRulerNew to Visual Studio Code? Get it now.
SmartRuler

SmartRuler

Josh Endries

|
4 installs
| (0) | Free
Displays line-wrap reminders while considering indentation.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SmartRuler

SmartRuler adds vertical bars to any line beyond a configurable length (i.e., a ruler), however SmartRuler will take into consideration indentation and whether or not the line is a comment or not. Considering indentation allows one to ensure that lines of textual content are of the configured length regardless of their indentation. By default, and for unrecognized languages, every line will be checked for length (while considering indentation).

The default line length is 65 characters, which studies have suggested is near the optimal length for human comprehension.

If an applicable line extends beyond the limit, one or more vertical bars (borders) will be drawn, based on the configured styles, with the configured number of characters (increment) in between each vertical line.

Testing

This test pattern can be used to manually test most cases. The first and last two lines shouldn't have any markers. Every other line should have markers starting on the right side of the 66th character and stopping on the 71st character.

123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 // 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 // 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 /* 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 / / 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 */ 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft