Disable White Vertical Line - visual-studio-code

So I've installed VS Code on my Mac and it works perfectly fine. There's just this white vertical line going down the screen which is kinda annoying.
I'm not sure if it's supposed to be some sort of guide, ruler or something. It just appeared from the start. Is there a way to disable it?
It looks like this :

There can be 2 places where it has "editor.rulers" in the settings.json.
Make both empty.

By default the ruler shouldn't be visible, but you can check for the following setting:
editor.rulers.
If set, it's an array with column numbers. If you want to turn it off, you can simply set an empty array like this:
"editor.rulers": []

This was bugging me a lot as well... so I finally tracked down the setting which turned it off.

In the latest version of vscode you can follow this process to get rid of that white line
Step 1: Go to Preferences -> Settings
Step 2: Search for editor rulers and click on edit in settings.json
Step 3: In many cases, it would be like this:
"editor.rulers": [
80
]
Remove 80 and make it an empty array and save it.
"editor.rulers": []
By following these steps the vertical line should be removed.

As my dart file was having that issue. So I have added in setting.json:
"[dart]" : {
"editor.rulers": []
}

If you search in your settings file - the default settings that is - you will find
// Controls whether the editor should render indent guides
"editor.renderIndentGuides": true,
Set that to false in your user settings - typically the right panel if you open "Settings' from the lower left gear icon.
You can also change the indent guides color if you wish. See Change indent color in theme for VSCode? to learn how to do so. Generally you can find a lot by opening up your Settings and then searching through the default settings.

If u just want to get rid of the rightmost line, edit your settings.json file
"editor.rulers": [],
And if you want to get rid of the left sidelines, just make sure

settings.json
{
"workbench.colorCustomizations": {
"editorRuler.foreground": "#00000000"//transparent
}
}
Vertical rulers in Visual Studio Code

steps for solution:
click ctrl+, in vs code editor, or manually open the setting in vscode editor.
search for editor rulers and after a search click on Edit in settings.json
enter image description here
make editor rulers empty.
close the tap
enter image description here

Here are some steps:
Open vs code settings.json file
then under json file search for this line of code "editor.rulers":
then remove the or blank the array like this"editor.rulers": [], and save the file.

Press Ctrl + Shift + P => Type: setting.json and then click "Open Settings (JSON)
Then change to this: "editor.rulers": [],

Related

how remove this white line in vs code [duplicate]

So I've installed VS Code on my Mac and it works perfectly fine. There's just this white vertical line going down the screen which is kinda annoying.
I'm not sure if it's supposed to be some sort of guide, ruler or something. It just appeared from the start. Is there a way to disable it?
It looks like this :
There can be 2 places where it has "editor.rulers" in the settings.json.
Make both empty.
By default the ruler shouldn't be visible, but you can check for the following setting:
editor.rulers.
If set, it's an array with column numbers. If you want to turn it off, you can simply set an empty array like this:
"editor.rulers": []
This was bugging me a lot as well... so I finally tracked down the setting which turned it off.
In the latest version of vscode you can follow this process to get rid of that white line
Step 1: Go to Preferences -> Settings
Step 2: Search for editor rulers and click on edit in settings.json
Step 3: In many cases, it would be like this:
"editor.rulers": [
80
]
Remove 80 and make it an empty array and save it.
"editor.rulers": []
By following these steps the vertical line should be removed.
As my dart file was having that issue. So I have added in setting.json:
"[dart]" : {
"editor.rulers": []
}
If you search in your settings file - the default settings that is - you will find
// Controls whether the editor should render indent guides
"editor.renderIndentGuides": true,
Set that to false in your user settings - typically the right panel if you open "Settings' from the lower left gear icon.
You can also change the indent guides color if you wish. See Change indent color in theme for VSCode? to learn how to do so. Generally you can find a lot by opening up your Settings and then searching through the default settings.
If u just want to get rid of the rightmost line, edit your settings.json file
"editor.rulers": [],
And if you want to get rid of the left sidelines, just make sure
settings.json
{
"workbench.colorCustomizations": {
"editorRuler.foreground": "#00000000"//transparent
}
}
Vertical rulers in Visual Studio Code
steps for solution:
click ctrl+, in vs code editor, or manually open the setting in vscode editor.
search for editor rulers and after a search click on Edit in settings.json
enter image description here
make editor rulers empty.
close the tap
enter image description here
Here are some steps:
Open vs code settings.json file
then under json file search for this line of code "editor.rulers":
then remove the or blank the array like this"editor.rulers": [], and save the file.
Press Ctrl + Shift + P => Type: setting.json and then click "Open Settings (JSON)
Then change to this: "editor.rulers": [],

How don't show excess vertical lines in VSCode

I have 2 files, first .phtml
Screen of code from there:
And second file .vue:
Using the red arrows in the screenshot above, I want to show that there are extra vertical lines in the Vue file, which, it seems, do not connect anything.
There are no such lines in the .phtml file
How can I remove them?
You have to set that in the settings file as stated in the docs of VSCode settings
Press Ctrl + Shift + p, type settings and go to Preferences: Open Settings (JSON) to open User Settings, and add this:
"editor.renderIndentGuides": false,
Its work for me:
"editor.detectIndentation": false

Make the code folding icons always show in Visual Studio Code

Loving using Visual Studio Code but one peeve is that I always think my code isn't indented properly since the left edge of the actual editor is kind of far from the numbers.
Is there any way to show the code folding +/- icons by default? It only shows them if you hover over the gutter.
As an aside, if there is a way to change the color of the gutter so it looks distinct from the editor?
To change the color of the gutter, you can add following to the user settings:
"workbench.colorCustomizations": {
"editorGutter.background": "#abcdef"
}
And to show folding icons:
"editor.showFoldingControls": "always"
Note that this setting requires you to have at least 1.13.
You cannot make code folding icons appear persistently. It is discussed here on project github page however it is not implemented yet.
If you want proper indentation your best bet is indentation guides (the vertical lines that run down to matching indents).
Indentation guides are not displayed by default.To enable indent guides go to File --> Preferences --> Settings and then place following line in settings.json file,
"editor.renderIndentGuides": true
you can make code folding icons appear persistently by addding :
"editor.showFoldingControls": "always",
but not in the "workbench.colorCustomizations", just put it outside and it will work.
example:
"editor.showFoldingControls": "always",
"workbench.colorCustomizations": {
"editor.renderIndentGuides": true,
"scrollbarSlider.background": "#474552",
"scrollbarSlider.hoverBackground": "#295377",
},
and since the [+][-] icons were replaced with [>][v], you can use this extension to regain this feature: Minimalist Product Icon Theme
I know this is an old thread, but FWIW:
File > Preferences > Settings
User > Text Editor > Editor: Show Folding Controls
Select "Always"

How to disable VS Code minimap in Windowed mode?

I did the following in Visual Studio Code:
settings.json => "editor.minimap.enabled": true
Open 2ed files side by side (windowed mode)
Minimap exists in both windows
This takes up too much room, but I still want to use the Minimap when I'm editing a single file in a single window. Is there a way to have the Minimap enabled for a single file, but disabled in side-by-side "Windowed" mode?
Toggle minimap command has been added since vscode 1.16. Hit command + shift + p and select View: Toggle Minimap.
There is no way to do this in VS Code. Currently there is only the "editor.minimap.enabled": false setting which can be true or false and either always enables the minimap or always disables it.
Unfortunately, as shown in this issue, there is also no "toggleMinimap" command to assign to keybindings.
You might find this extension useful, though, as it can be used to create a toggle minimap command:
settings:
"settings.cycle": [
{
"setting": "editor.minimap.enabled"
}
]
keybindings.json:
{
"key": "ctrl+shift+t",
"command": "settings.cycle.workbench.colorTheme",
"when": ""
}
Simplest way is go to:
View -> Toggle Minimap
Update:
In newer versions:
View -> Show Minimap
To remove/disable/hide VS Code Minimap,
Go to the View tab and uncheck this: View > Show Minimap
1) Go to File -> Preferences -> Keyboard Shortcuts
2) type in "View: minimap"
3) right click and add a key binding.
I like to use ctrl+m ("m" for minimap)
If there are existing key bindings, you can use another one, or click the existing one(s) listed, then right click them and remove the binding before repeating steps 2 and 3 above.
New option available,
View-> Show minimap (uncheck)
In Visual Studio Code Version 1.41.1. Go to
Files >> Preferences >> Settings
Select
Text Editor >> Minimap >> Uncheck Enabled checkbox
I didnt find "minimap", instead I found:
[Options]>>[Text Editor]>>[All Languages]>>[Scroll Bars]>>Behavior>>"Use map mode for vertical scroll bar"
I am not able to embed image yet, check link

How to disable or hide scrollbar/minimap?

I can't find any option, setting, or keyboard shortcut that disables or hides that annoying scrollbar. I just don't find it useful and it's distracting.
Can't just edit the editor's CSS like Atom, either.
Remove Minimap
Add the following to your settings.json file
"editor.minimap.enabled": false
Note that, as pointed out in another answer, this process has now been simplified to:
View->Show Minimap
Remove the Overview Ruler
Add the following to your settings.json file
"editor.hideCursorInOverviewRuler": true
This will keep the scrollbar, but will result in it only appearing when the cursor is within the editor, as seen in the image below:
Completely remove scrollbars (requires restart)
If you would like to completely remove the scrollbars, add the following to your settings.json file (note the editor will say "Unknown configuration setting" - ignore this. It will still work):
"editor.scrollbar.horizontal": "hidden",
"editor.scrollbar.vertical": "hidden"
This will result in the scrollbars not being visible even when the cursor is in the editor, as seen in the image below:
Ctrl + Shift + P -> Open User Settings
"editor.minimap.enabled": false
Try this,
view->toggle minimap
or after version 1.43
view->show minimap
Removing the scroll bar
These no longer work:
"editor.scrollbar.horizontal": "hidden",
"editor.scrollbar.vertical": "hidden"
However, this will set the size of the scroll bar to 0:
"editor.scrollbar.verticalScrollbarSize": 0,
The toolip says "Unknown Configuration Setting" but it works for me.
(Visual Studio Code 1.39.2)
So this is an unofficial method as instructed on accepted answer by #badfilms. You can read about it here
After adding, restart vscode:
"editor.scrollbar.horizontal": "hidden",
"editor.scrollbar.vertical": "hidden"
This gives and "Unknown configuration settings", ignore it.
Then to remove the scrollbar seperator or ruler border, add this:
"editor.overviewRulerBorder": false
Goto View and deselect Minimap.
tested Visual Studio version: VS Community 2017 Version 15.8.2
Tools --> Options
Search for "scroll"
click on "Text Editor" title from the results on the left side.
click "Use bar mode for vertical scroll bar" under "Behavior" section and then click "OK"
Here is a screenshot:
You can toggle it from the top bar "View > Show Minimap",
But you can also define it as a keyboard shortcut!
Go to: "File > Preferences > Keyboard Shortcuts"
Search: "Minimap"
Select: "View: Toggle Minimap"
Select the keyboard you wish to link (I used Ctrl+M)
In Visual Studio 2019
Right click on the scroll bar and select "Scroll Bar Options" from the context menu.
This will display the settings for the Scroll Bars.
Under the Behavior heading halfway down, select "Use bar mode for vertical scroll bar" then click Ok. This removed the map mode from the bar.
View --> Show Minimap -click it to uncheck it-
Just to update the situation, in the past the settings mentioned above worked, despite showing an unknown configuration error, after a reload, because they had not been officially exposed to users. With v1.58 these settings will be "official" and not require a reload.
editor.scrollbar.vertical - 'auto' | 'visible' | 'hidden'
editor.scrollbar.horizontal - 'auto' | 'visible' | 'hidden'
editor.scrollbar.verticalScrollbarSize - number
editor.scrollbar.horizontalScrollbarSize - number
editor.scrollbar.scrollByPage - boolean
See Expose editor scrollbar options and react to them being updated.
once you go to the user setting it has default setting left had side as bellow and
there is a pensile mark on where click and automatically appear true false then right had side custom setting change. Thats how I did it thanks Alexandru.
think this may help you.
Default value of Scroll Beyond Last Column is 5 which does horizontal scrollbar visible and operate. Set the value to 0 removes horizontal scrollbar.
Settings options
for hidden scroll bar add into setting.json
`"window.scrollBarVisibility": "hidden",`
for hidden minimap add :
"editor.minimap.enabled": false,
For all projects
Write to a search settings:
Then change this values as on screenshot: