I'd like to create an extension to editor's status bar in Visual Studio 2022.
By this, I mean line with cursor position and code cleanup button.
It seems that in previous versions of the IDE, the cursor position was presented in the status bar of the IDE:
There is plenty of information how to work with IDE's status bar, but I cannot find any example how to tackle editor's status bar. Any hint, article, blog post is highly appreciated.
Related
i am using Microsoft Visual Studio Community 2019 Version 16.6.5;
The problem is that: when i go to
Tools > Options > Text Editor > C# > Code Style > General
if i want to change the "Severity" of a line, the edges of the box of the current Sevrity becomes red. (maybe some problems occurs)
Infact, after I press "ok" button to confirm, it resets all value that i have changed.
this image shows the setting that i changed: that drop down button was "Refactoring only", but I want "Suggestions".
there a link to a YouTube video that I was watching; the link shows what I want to do.
(link directly to the minute 19:00)
Thanks!
I am using VB.Net 2015 edition and it's coder menu not showing. How to add that?
Image Of Menu in Coder:
Tools > Options from the main menu. Text Editor > Basic > General and check the 'Navigation bar' box. ALWAYS look in the IDE options when you want to manipulate the IDE. Yes, there's a lot in there, but that's why you should have a look through it BEFORE you need to use it: so that you have a fair idea of what's available. Anything related to the code editor window specifically is under the Text Editor section.
Most IDEs have a display that tells the user what line (Ln) and column (Col) position the cursor is currently located at. Is this function available in the Visual Basic Editor?
The Visual Basic editor does have this functionality.
The Ln and Col display is the last widget on the 'Standard' toolbar. You can right click on the menu bar or any toolbar and check the box next to 'Standard'.
If the toolbar is enabled, but you cannot see the Ln/Col display then the tool bar placement has caused the VBE to truncate the toolbar; try moving your toolbars around.
As already noted that basic functionality is part of the [Standard] toolbar.
With Rubberduck (an actively maintained, open-source VBE add-in project I manage), you get much more than that:
The [Rubberduck] toolbar dwarfs the VBE's line/column display, which only shows the start of the current selection. Rubberduck's context-sensitive toolbar displays:
L1C1-style current selection for single-character selections
L1C1-L1C1-style current selection for multiple-character selections
But also context-sensitive information about the selected declaration:
The name of the type library it's located in;
The fully-qualified module/member name;
The type of declaration (whether it's a function, a property, etc.);
The declared/return type, when applicable;
If the declaration has a docstring, a VB_Description attribute, or a Rubberduck #Description annotation, that description appears in the toolbar;
The number of references to that identifier across the entire project.
The latest/current pre-release/CI build apparently has a bug that prevents the L1C1 selection from being displayed. Will be fixed shortly. We're also working on fixing an annoying glitch that makes the reported number of references in the toolbar be off (clicking the button brings up the correct number of references in a Search Results toolwindow tab though). You may want to try v2.0.13 instead of the latest 2.1 prerelease/CI builds.
I'm using Visual Studio 2017 and have followed the instructions in this answer to change the behaviour of Ctrl+Tab and Ctrl+Shift+Tab to switch to next and previous tab, respectively.
Problem is, while Ctrl+Tab works fine, Ctrl+Shift+Tab only switches to the previous tab when the current document is not a Web Form or similar (e.g. master page). On those pages, the combo switches between Source, Design and Split view instead. How can I disable this behaviour?
I've looked through the keyboard shortcuts in Visual Studio settings and haven't found any others that are mapped to that combination. I've even disabled Web Forms designer (so only Source view is available), but it doesn't help, Ctrl+Shift+Tab simply doesn't do anything then.
Set the shortcut keys for the Window.PreviousTabAndAddToSelection command in the HTML Editor Source View (instead of Global) to Ctrl+Shift+Tab. This has the minor side effect of selecting the previous tab when navigating away from a web form tab, but successfully avoids the unexpected behavior of taking you to the split or design sub tabs.
I am running Xamarin Studio 4.2.3 on Windows. I have it set to show the autocomplete window automatically when typing... so for instance, when I type cw the following appears:
The editor will allow me to choose CswWriter from the list and press either TAB or ENTER to replace the cw with CswWriter.
However... it will not allow me to choose the cw snippet from the dropdown. I also dug through the Key Bindings dialog looking for the ability to bind something like "Expand Snippet" to a key and did not see it.
Anyone know what's going on? How do I expand the snippet?
I CAN bind a key to "Insert Template...", which pops up another autocomplete-like window with only code snippets in it... but why put them in the normal autocomplete if it won't actually let you choose them?
Xamarin Studio has similar behaviour to Visual Studio. To expand the snippet you need to press tab when the completion window is closed.
When you type in cw, the auto-completion window is displayed, pressing tab will then complete the text, in this case cw, which you have already written. Now if you press tab again the code snippet will be expanded.
The first tab key press in your example is a bit confusing since you have already typed in the full text, however for longer code snippet names (e.g. 'prop' and you have typed in just 'pr'), it is less confusing since you will complete the text for the code snippet with the initial tab key press, then pressing tab again will expand it.
Visual Studio displays the message "Press TAB twice to insert the snippet" in the code completion window to make it more obvious what you need to do.