I recently switched to Visual Studio Code and I love it! It starts so quickly andI just enjoy the open source environment more than Visual Studio. But there's one problem that I have encountered that bothers me more than it should.
Before I could if I wanted to autocomplete the syntax for an if statement I'd just be able to type in "if" and touble tap tab, but now the autocompletion IntelliSense things pop up in the wrong order:
The red box is the wrong one that gets displayed first and the green box is the one I want at the top. My question is if there's a way to configure it so that I get that statement at the top. It's the same with for-loops, foreach-loops and pretty much every other autocompletion that I want to use.
Create snippet (or edit) ctrl+shift+p Preferences: Configure User Snippets
settings (ctrl+,)
"editor.snippetSuggestions": "top",
Related
I use Visual Studio IDE for C#. By default, you need to click "Tab" button twice to insert a snippet. Is it possible to insert snippet with only one "Tab"? please suggest me settings or extension.
To answer your question.
No, it is not possible to do that.
But there is a "trick" to make it feel like a TAB.
You hold TAB a little bit longer (but is no longer effetiv as pressing TAB 2 times).
I have Visual Studio 2017 for C# (Express and Community) and I am trying to add some inline comments to my class attributes for Doxygen. Between my declaration and my comment I wish to have tabs to align my comments properly. VS however replaces those tabs with spaces every time I hit the autoformat keys Ctrl-K Ctrl-D. It doesn't help to set "Keep tabs" under "Tools/Options/Text Editor/C#/Tabs". VS doesn't keep those tabs anyway. I didn't find anything under "C#/Code Style/Formatting" either.
Is there anyway to prevent autoformat from replacing my tabs?
I already tried asking on MSDN, but everything they told my to try out didn't help, see here.
I've used both Xcode and Visual Studio extensively over the past year, and the one thing I miss about Xcode when using VS is the autocompletion suggestions while typing in the middle of words. Let me explain:
In Xcode, autocomplete suggestions (the little dropdown that appears as you begin to type) work from any point in the word. So lets say you start typing something, click somewhere else, then get back to what you were typing; Xcode will happily keep giving you autocomplete suggestions. If you do this in VS, you'll find that autocomplete suggestions don't appear. You have to delete what you typed and start over again. If you were typing a method, you have to erase up to and including the dot, re-type the dot, and only then do you get the suggestions. This is very annoying when going from Xcode to VS. Is there any way to enable Xcode style autocomplete suggestions in VS? I've googled but all I've come up with are plugins like Visual Assist X, which are not free and have a bunch of other features I'm not sure I absolutely need. I'd like something that would solve this specific issue, preferably free.
Isn't ctrl + spacebar doing the trick? It enables autocomplete when used.
There might be something more advanced you are after tho.
Let me explain what I'm trying to do. So in SQL Management studio, you can click the checkmark box to have it refresh/evaluate your query before trying to execute the query.
What I'm wondering is if there is something similar in VS to do the same thing. Let me explain the scenario...
I had some code with calls to a function. I am removing this function to consolidate code. I know the function is called numerous times, so I commented the whole function. I knew without a doubt there would be errors, and along with that the color boxes for them should have shown up in my scroll bar.
Nothing did (either in error output window or scroll bar). So I ran a build (knowing it would fail) and of course it did with my error output now populated as well as my scroll bar.
Is there a similar functionality in VS that I am not aware of that will force not only the error window to output outstanding errors, but also force the scroll bar to update as well without doing an entire build (like SQL's check query)?
In Visual Studio 2013 a build (CTRL-SHIFT-B) is the only option. A full rebuild works as well of course, but is not required.
Things may change in Visual Studio 2014, when Roslyn is introduced.
While I edit C# code in Visual Studio 2012, the "Error List" window continually updates with a list of current syntax errors etc. I find this very distracting and would like to turn it off.
Does anyone know how to turn it off?
(I don't really know what this VS feature is properly called, so someone might already have answered it... Apologies if this is the case.)
You can try with based on : General and deselecting the "Always show Error List if build finishes with errors"
Tools -->Options--> Projects and Solutions --> General and deselecting the "Always show Error List if build finishes with errors".
I usually unpin it (with the pin icon in its top right corner), and call it up when I want to see it by moving the mouse onto its title. Once you compile your project, the window will automatically come up if there are any errors.