I have a program that I'm writing, and upon pressing the tab key inside a textbox, I would like it to autocomplete that word from a list that may change at any time. I've taken a bit of a peek around, but I can't find anything useful - most things that I'm finding are about disabling intellisense in Visual Studio - not what I'm after. I need something at runtime.
Any ideas?
Related
In Visual Studio 2022 (v 17.3.6), I would like to be able
Identify this UI hint/tooltip/feature of the C# editor. It comes up merely when hovering
over anything/everything, and clutters up the screen greatly.
Partially turn it off. In particular I would like to see this only after I have
pressed a hot key/chord or clicked, etc. In other words, I only want it to appear once I have done something more "active"
than merely hovering the mouse over the code.
I searched google, and Tools > Options in VS2022. I have tried all the options that make
mention of IntelliSense, "quick info", and "inline hints", turning each off in turn.
Nothing seems to turn off. I would like an in-VS solution if there is one, rather than yet another VSIX package that does other things I don't want.
Using VB.NET in Visual Studio 2019. Type a single space character anywhere in the codebase and a popup displays a long list of options. You have to constantly click away or press ESC. This quickly gets annoying.
Tools > Options > Text Editor > Basic > General > Auto list members stops these unwelcome popups...but now "member of" functions are not listed at all! For example:
Dim test As String = "fred"
test. ' Nothing is displayed when the dot is typed, but expected `Length`, etc
Is it possible to get Intellisense for "member of" only, but otherwise switched off and no other automatic listing (so nothing would be displayed when you are just typing away).
What a shambles to do so much with a single setting. If someone from Microsoft is reading this, check out how Borland's Delphi 7 handled this...an IDE of speed and beauty.
Very annoying that it distracts you that much. Im sorry to hear that.
Unfortunately, the final answer is that it cannot be solved, because microsoft would never consider an unpopular opinion.
The 'popup' is one of the most important features why people moved away from notepad in the first place. Every IDE will have it, and if they dont, they soon might. it is rarely unwelcomed.
With that in mind, microsoft didnt intend visual studio to be used without it.
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.
Apologies upfront if this is a silly question, but it's annoying me to no end and I can't figure it out.
I'm using Visual Studio 2013 Professional, and I usually code in C# where when using the Intellisense, when I press Enter to select a method or something it adds my selection and I can continue typing on the same line.
But at the moment I'm working on a project which is in VB.NET, and when I use the Intellisense in the same way it puts my cursor in the next line, i.e. I press Enter to select whatever, it adds my selection and starts a new line, so I have to press the Backspace to go back to the previous line. It's so annoying!
Is there a way to change this behaviour so the cursor doesn't go to the next line? I've looked at the settings available in Tools > Options but can't figure it out, and searching Google for anything similar hasn't been successful.
Found it here (paragraph List Members)
You have toggled to suggestion mode instead of completion mode.
You can also change to suggestion mode, in which only the text you type is inserted into the code. For example, if you enter an identifier that is not in the list and press TAB, in completion mode the entry would replace the typed identifier. To toggle between completion mode and suggestion mode, press CTRL+ALT+SPACEBAR or click Edit/IntelliSense/Toggle Completion Mode.
So, either use TAB/SPACEBAR (as I said in the comment) or press CTRL+ALT+SPACEBAR to switch back to completion mode.
EDIT: I've found out that whenever you type Stri (String will show highlighted in the list now) and you press . (dot) it will autocomplete and stay at the same line.
I think your way of doing this in C# isn't possible in Visual Basic.
I had the same problem and discovered that Auto list members was not enabled on my machine. It's under Tools > Options > Text Editor > Basic > General. This gave me the intellisense I was looking for.
Simple thing which can be used when you face this kind of issue is to press
tab key instead of Enter key when the IntelliSense provided me prediction list.
I'm using coderush with vs 2008. coding in VB.net.
I don't see any evidence of Intellassist, all i see is the usual VS intellisense.
Is this normal? Preferred? Do most people leave the defaults or do most/some turn off vs's intellisense?
Does intellassist somehow agument intellisence?
thanks
jonathan
I see CodeRush Intellassist as an extension of Visual Studio Intellisense and not its replacement or anything else. Intellassist completes the text at the editor caret position with an in-scope identifier and may include other suggestions, such as physical file path completion or enumeration elements completion (which is not actual for Visual Basic).
To use Intellassist, just write code as you normally would. When Intellassist senses one or more suggestions matching the code you've entered so far, the best suggestion will be displayed to the right of the editor caret.
Once Intellassist is active, you have several options:
Press Enter to accept the highlighted suggestion. If you have the case-sensitive option turned off, Intellassist will ensure the entire suggestion is properly cased to match the declaration.
Press Shift+Enter to accept a portion of the suggestion. Shift+Enter accepts from the caret to the character preceding the next uppercase letter in the suggestion. For example, if "AllowMultipleSelections" was the suggestion, and "al" had been typed in, pressing Shift+Enter successive times would cause the selection to shift as follows:
Shift+Enter is useful when you need to create a new variable name that is similar to a portion of an existing suggestion, or when you want to quickly access a different but similarly-named suggestion (differing only in the latter portions of the text). You can press Shift+Enter to move the selection right, and then start typing to get other suggestions.
If more than one entry is suggested you can cycle forward and backward through the suggestions by pressing the Tab and Shift+Tab.
Press the Delete key to cancel the suggestion.
Do nothing for a few moments and Intellassist will hide the suggestion.
If the text you've entered is a code template that you want to expand, just press Space or ; to expand the template normally.
Continue typing (narrowing down the suggestion list or ultimately ignoring all suggestions).
Intellassist is highly configurable. You can specify whether case-insensitive suggestions should be made, and also change a host of other options.