Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set vertical rulers in vscode based on file type?

I wish to set the following rulers only when viewing *.py files. Is that possible?

{
    "editor.rulers": [72, 79]
}
like image 438
fredrik Avatar asked Nov 25 '16 13:11

fredrik


People also ask

How do you set line length in VS Code?

In VSCode, go 'Code -> Preferences -> Settings' and search for "python formatting black args". A few notes about line lengths in Python: PEP8 recommends a line length of 79 characters (72 for docstrings) Black sets line lengths to 88 characters by default.

How do you select vertical in VS Code?

Keyboard shortcut for vertical block selection: To select code block vertically in your visual studio code, use Shift + Alt and then use the mouse to select lines vertically, from top-left to bottom-right.


1 Answers

As of version 1.9, Language specific settings was introduced. This means that you can now use the following configuration to achieve what you want:

"[python]": {
    "editor.rulers": [72, 79]
}
like image 154
Zsw Avatar answered Sep 20 '22 04:09

Zsw