I've just installed Visual Studio 2017 and got strange vertical indentation marks in code editor.
How can I remove them?
P.S. I disabled all extensions but it doesn't help.
There is an option under Tools → Options → Text Editor called Show structure guide lines that should remove that.
In the last version of Visual Studio Code, downloaded in July/2017 (please note that this is not Visual Studio, but as #tambre pointed out, this may help in VS too), the name of this setting changed:
Go to the menu Code->Preference->Settings and search for "renderIndentGuides". The complete setting should appear as:
"editor.renderIndentGuides": true,
Change it to false and that's it.
Just press ctrl+E,S and it will be removed.
The same thing in VS2019 is called Show guides for declaration level constructs in the section of Tools → Options → Block Structure Guides; you might want to uncheck Show guides for code level constructs as well.
A slight update for those using Visual Studio Code, version 1.48.1 (2020-08-19) on Windows 10.
Go to the Settings: Ctrl+, OR File => Preferences => Settings
Search for renderindent
Toggle the settings checkbox for Editor: Render Indent Guides
It's been mentioned in a comment, so I'm just bringing this up as an alternative answer: you can change the color of the vertical dotted lines. They are called "Structure Guide Lines" in the Visual Studio Tools -> Options -> Fonts & Colors dialog. I set mine to { 55, 55, 55} so they are barely visible on the dark-mode background.
Another related setting is "Visible White Space" color, which I set to { 13, 52, 60} after activating the Edit -> Advanced -> View White Space (Ctrl+R, Ctrl+W) option.
Go to Settings->Text editor -> Editor>Guideline:indentation -> uncheck
Related
Here:
https://social.msdn.microsoft.com/Forums/de-DE/b77c7529-298f-4b9a-874a-f94f699986ac/automatically-formatting-xaml-code?forum=vswpfdesigner
... it is written that one can use "Ctrl+K+D" ... but that didn't work.
I also tried "shift + alt + F", which was suggested here:
How do you format code in Visual Studio Code (VSCode)
... it didn't work either.
So my question is: how can you automatically format XAML code in Visual Studio?
Probably your formatting options are wrong, go to: Tools -> Options -> Text Editor -> XAML -> Formatting -> Spacing and on Attribute Spacing section click "Position each attribute on a separete line" and then try "Ctrl+K+D" again.
I would check out XAML Styler, which is a Visual Studio extension to help format your XAML source code (full disclosure, I am one of the owners on the project).
Edit: Forgot to mention that Visual Studio does not have a very rich set of XAML formatting capabilities on its own.
Shortcut key for XAML formatting in Visual Studio for Mac machines: Ctrl+I
In case you guys still don't know how...
It's called 'Format Document', you can find it inside menu:
Edit => Advanced => Format Document
There is also shortcut for it:
Ctrl+E then Ctrl+D
This works for most document, including XAML.
EDIT: When this post was made, I was using VS 2017
I use Xaml Formatter. Works pretty good for me. You will just have to assign code formatting with Xaml Formatter to a Ctrl+K Ctrl+D shortcut in Xaml files, since it is not done by default (it's creating Format Xaml option in Tools menu).
Also Inline Color Picker is a very simple but extremely useful extension if you are developing a lot of Xaml code.
Try using "XML Tools" for VS Code, the shortcut is Alt + Shift + F
For anyone who is searching for kind of combining "Insert a single space between attributes" and "Position each attribute on a seperate line" I found this solution:
Tools -> Options -> Text Editor -> XAML -> Formatting -> General -> Tag Wrapping
and tick "Wrap tags that exceed specified length".
Self-explanatory that one can adjust the length in the following input field.
I would like to see all files or documents I've opened in Visual Studio. I do not want them to be auto hidden or hidden on overflow.
How can I achieve it?
One of the built-in option to do so: use pinned tabs.
http://dailydotnettips.com/2016/01/21/persevering-and-separating-the-pinned-tabs-in-visual-studio/
If you don't want to read a external page just for setting:
Tools -> Options -> Environment -> Tabs and Windows -> Show pinned tabs in a seperate row
It's not completely what you want, but it's free and may be useful.
Maybe it's not exactly what you search, but here is a way to at least get a second row for pinned tabs.
Effectively get you more space for opened files:
Tools -> Options -> Environment -> Tabs and Windows -> Show pinned tabs in a seperate row
Visual Studio has this extension taken from msdn.microsoft.com tested and worked
Simple installation: download, doubleclick to install, restart VS IDE. Then open all the tabs you want they all will be displayed and No hidden.
https://visualstudiogallery.msdn.microsoft.com/EBF6137E-AA2D-4DC9-860A-F04168F11CD7
Dung Le.
It's worth noting that starting in VS 2019 v16.4, you can now have "vertical tabs" which will list all open tabs vertically, making it easy to see all open files.
https://learn.microsoft.com/en-us/visualstudio/ide/customizing-window-layouts-in-visual-studio?view=vs-2019#vertical-document-tabs
In Visual Studio 2022, this issue now has a native solution. Go to Tools -> Options -> Environment -> Tabs and Windows -> Show tabs in multiple rows. Excess tabs will be shown on additional rows. There doesn't seem to be a limit on how many rows this can use.
Another relevant option that some may find useful; you can choose "Show invisible tabs in italic in tab dropdown menu". The dropdown button is only visible when you hover your mouse near the end of the row of tabs. Showing invisible windows in italics makes it easier to identify windows that are only visible in the overflow menu.
For those using Visual Studio 2022, check the "Show tabs in multiple rows" setting in Tools > Options > Environment > Tabs and Windows section.
For Visual Studio Code
If you want to see all the opened tabs,
you can simply on wrap tabs option in the VS Code settings
settings > User > Workbench > Editor > Wrap Tabs
Visual Studio 2013 introduced a new feature where it shows you how many times each of your methods are used.
I don't find it very useful, and it messes up the spacing of my file. How do I disable it? Can't seem to find the option.
I guess you probably are running the preview of VS2013 Ultimate, because it is not present in my professional preview. But looking online I found that the feature is called Code Information Indicators or CodeLens, and can be located under
Tools → Options → Text Editor → All Languages → CodeLens
(for RC/final version)
or
Tools → Options → Text Editor → All Languages → Code Information Indicators
(for preview version)
That was according to this link. It seems to be pretty well hidden.
In Visual Studio 2013 RTM, you can also get to the CodeLens options by right clicking the indicators themselves in the editor:
documented in the Q&A section of the msdn CodeLens documentation
Another option is to use mouse, right click on "x reference". Context menu "CodeLens Options" will appear, saving all the navigation headache.
Workaround....
In VS 2015 Professional (and probably other versions).
Go to Tools / Options / Environment / Fonts and Colours.
In the "Show Settings For" drop-down, select "CodeLens"
Choose the smallest font you can find e.g. Calibri 6.
Change the foreground colour to your editor foreground colour (say "White")
Click OK.
The other features of CodeLens like: Show Bugs, Show Test Status, etc (other than Show Reference) might be useful.
However, if the only way to disable Show References is to disable CodeLens altogether.
Then, I guess I could do just that.
Furthermore, I would do like I always have, 'right-click on a member and choose Find all References or Ctrl+K, R'
If I wanted to know what references the member -- I too like not having any extra information crammed into my code, like extra white-space.
In short, uncheck Codelens...
In VSCode for Mac (0.10.6) I opened "Preferences -> User Settings" and placed the following code in the settings.json file
"editor.referenceInfos": false
User and Workspace Settings
The Visual Studio editor highlights the current line by changing the background color of the current line. Is there a simple way to disable this highlighting? Otherwise, which parameter in Fonts and Colors dialog controls the background color of the currently selected line in the editor?
Is there a simple way to disable this highlighting?
Tools -> Options -> Text Editor, in the Display group, uncheck "Highlight current line"
Which parameter in Fonts and Colors dialog controls the background color of the currently selected line in the editor?
The colors are named "Highlight Current Line (Active)" and "Highlight Current Line (Inactive)"
To disable the border around the current line
In VS 2019
Go to : Environment -> Fonts and Colors:
Find the display item: Highlight Current Line
Set the item foreground color to: Automatic
In VS 2017 and earlier
Go to : Tools -> Options -> Text Editor:
Find the display items:
Highlight Current Line (Active)
Highlight Current Line (Inactive)
Set the item foreground color to: Automatic
if its visual code make
"editor.renderLineHighlight": "none"
The Visual Studio editor highlights the current line by changing the background color of the current line.
The only time I've seen this is when "Use Windows High Contrast settings" is enabled (Options > Environment > General)
With this setting disabled, I just get a subtle grey box to indicate the current line (this may depend on your Color Theme):
If you're using Resharper, it's:
Tools -> Options -> Text Editor:
ReSharper Current Line Highlight
press -> Ctrl + comma
Search => Render Line Highlight
select none from the options
In addition to the previous answer, I'd like to mention that Visual Assist (the tomato icon) also have an highlight current line feature, that can still be active while your Visual Studio highlight option is turned off.
This drove me crazy! Find it in Visual Assist Option panel, Display category.
So don't forget to also uncheck the VisualAssist highlight option.
edit
my settings:
Visual Assist option turned off
Visual Studio option turned on (in the Text Editors part)
In the font color settings, for Highlight current line (active and inactive), set the foreground to Automatic
Finally you can set your highlight color as you want with the background color.
Last point, sometimes Visual Studio mess things up even more, you may have to restart it, or close/open your tabs... sadly, YMMV.
For VsCode 2021 version users
Workspace > Text-Editor > Render Line Highlight > none
Visual assist and vsvim extensions were conflicting. So I disabled it within the visual assist options.
Uncheck the option: Highlighting->Highlight results of Quick Find and Find in Files.
For some reason "esc" doesn't work .
I just installed MSVS2010 Ultimate & I've noticed something which is somewhat annoying & conflicting with my syntax highlighting, as can be seen:
alt text http://localhostr.com/files/19038c/capture.png
As can be seen, when a keyword/function/variable/etc is highlighted all other instances of the aforementioned are highlighted too. This is somewhat annoying.
Is there any way to disable this?
This is considered a new feature of Visual Studio 2010.
But a fast trick to disable is following these steps:
Tools -> Options -> Environment -> Font and Colors
Choose the item Highlighted Reference
Set its color equal to the background you are using (i suppose a
really dark gray from your screenshot)
I like this feature but I tuned the color a bit to have it only little more lighter than the background :)
When using Visual Assist, find "VA X Find Reference" in Display Items
(Tools -> Options -> Environment -> Font and Colors)
Looks like it might be Visual Assist X. If you have that installed, disable "Automatically highlight references..." on the Advanced | Refactoring page of the VA Options dialog .
This is a new feature from VS IDE to show you other changes tothis object. but ifyoudo not like it you can easily changed it by pressing
CTRL + ALT + Spacebar
you can read detail in my blog
updtae : thismentioned in VS2010 official Website here
You also can try CTRL+SHIFT+DOWN ARROW or CTRL+SHIFT+UP ARROW. see the VS page