How do I tell VSCode the tab size for just the current file when it guesses wrong? - visual-studio-code

VSCode has a setting to "detect indentation" which is the tab size and tabs/space in the current file
When it guesses wrong, how do I tell VSCode the correct size for that individual file?
Note: Changing the global tab settings is NOT an answer. I don't want to change my default tab settings for the entire editor. I only want to tell VSCode the tab settings (size, tab/space) for the current file.

Related

How to customize font size of tab title in visual studio code [duplicate]

My computer is 4k display and the tab font is too tiny now. How to change the size of window tab font in as shown in this picture?
The window.zoomLevel setting can be accessed using:
File > Preferences > Settings and search for "zoomlevel"
VS Code Screenshot of window.zoomLevel Setting
This setting appears to zoom everything in the window, except for the top menubar.
I use a zoomLevel of 0.5.
After changing it to 0.5, I reduced my setting for editor.fontSize, to avoid the fontsize in the code editor becoming too large.
An alternative to modifying window.zoomLevel in settings is to use Ctrl + and Ctrl - to modify window.zoomLevel in increments of 1.
(I don't think VS Code currently has any option to configure only the size of the font used for the tab names.)
Please create a feature request for this on the repository.

visual studio code setting to display only the leading part of the file and not the full file name

In Visual studio code, opening files results in display of the full file name in the file editor tab, resulting in occupying the entire tab header space with only a few tabs when file names are long Ex.MyFancyComp.component.ts. Newly opened files show up by hiding older un-editted files.
This results in re-opening the previously opened files with ctrl-P command every now and then.
Is there any setting in vscode to minimize the tab size so as to accommodate more opened files within the editor?
Thanks.
Found it.
Preferences->Settings->Workbench->Editor Management->Tab Sizing: Change value from fit to shrink.
You would prefer having 'Tab close button' set to left.
Thanks

How to change size of window tab font in Visual Studio Code?

My computer is 4k display and the tab font is too tiny now. How to change the size of window tab font in as shown in this picture?
The window.zoomLevel setting can be accessed using:
File > Preferences > Settings and search for "zoomlevel"
VS Code Screenshot of window.zoomLevel Setting
This setting appears to zoom everything in the window, except for the top menubar.
I use a zoomLevel of 0.5.
After changing it to 0.5, I reduced my setting for editor.fontSize, to avoid the fontsize in the code editor becoming too large.
An alternative to modifying window.zoomLevel in settings is to use Ctrl + and Ctrl - to modify window.zoomLevel in increments of 1.
(I don't think VS Code currently has any option to configure only the size of the font used for the tab names.)
Please create a feature request for this on the repository.

How do I stop VSCode from the Side Bar moving to the folder that the current file is in?

In Visual Studio Code, whenever I close a file, the next open file becomes active in the editor and the Side Bar moves to that file's location in the folder structure. This is usually not the behavior I want. I often want to open another file in the same location as the one I just closed, but now my Side Bar has shifted around to what could be a totally different place in a large project.
I like the behavior of the main Visual Studio product where the Solution does not automatically shift. Instead, if I want to see where in the solution a file is, I can use a keyboard shortcut to move there ("Find File in Solution"), instead of automatically moving there every time the active file changes.
Is there any way to change/disable this functionality in VSCode?
The is an option explorer.autoReveal in settings (either user or workspace) which controls if the explorer should automatically reveal files when opening them.
Open VS User Settings (Preferences > User Settings). This will open two side-by-side documents.
Add a new "explorer.autoReveal": false setting to the User Settings document on the right if it's not already there. This is so you aren't editing the Default Setting directly, but instead adding to it.
Save the User Settings file.
in Version: 1.42.1
Open VS User Settings (Preferences > User Settings).
Search for "explorer auto reveal" without quotes.
Now uncheck the checkbox.
There is a new setting in v1.46 that will select the files in the explorer but not scroll to reveal them:
We have introduced a new value focusNoScroll to the
explorer.autoReveal setting. For this value Explorer will
automatically select files when opening them but will not reveal them.
from v1.46 release notes.
So that setting will highlight the active editor in the explorer but not scroll to it.

Matlab Current Folder Tab automatically reflect open file

I would like the current folder tab to automatically update whenever I open a new .m file in the editor. So the current folder tab will always be open to the folder of the file being displayed in the editor. Is this supported in Matlab? I know Visual Studio has a feature like this.
MATLAB doesn't do that. Perhaps this might be close enough for you though: if you enable the Document Bar in the editor (if it's hidden, go Desktop menu->Document Bar->Bar Position->Select a Position). Now open a file in the editor. If you right-click on its element in the Document Bar, there's an option to change the current folder to the location of the file. So not automatic, but only one click away.