When I type a word e.g. "cat", and then start typing another word at the start "ccat" and then use autocomplete (press enter with a suggestion selected, e.g. "cout"), the entire first word will be replaced, so I end up with just "cout".
This is not ok. How do I make it stop?
(I would like to end up with "coutcat" instead.)
I'm not sure whether Visual Studio or Visual Assist are responsible for this (it seems to happen with Visual Assist disabled too, but only sometimes?? o.O ).
That might be the result of Visual Assist completion behavior.
Try changing the CompletionOverwriteBehavior setting in the registry for Visual Assist to 01.
See http://docs.wholetomato.com/default.asp?W640
Related
In IntelliJ (and all the other Jetbrains products sharing the editor component), pressing the Delete Line keybinding without any selection will delete the entire line, and not just the text to the left of the cursor.
Is there any way to get this behaviour in VS Code too?
As per Cut line shortcut in Visual Studio Code (Ctrl+L in VS) (not delete line!) ...
The editor.action.clipboardCutAction keybinding (default in windows Ctrl+x) has this behavior. I just verified that this works in the latest release (1.60).
How can I block visual studio code from auto formatting on save?
It causes chaos to the git commit!
The blanks which are auto generated by this software, which have nothing to do with the function improvements, are messed up with the real useful code.
How can I get rid of this auto formatting?
Go to Settings and search 'format'. There's an option there called "Editor: Format On Save". Turn this off, and it should disable the auto-formatting.
I have a code with many comments, how can I hide these ones, but no delete, I need them after.
I need to hide all the comments in one click, not a simple collapse one
Can't find such feature as well.
Read this issue from GitHub - https://github.com/Microsoft/vscode/issues/46505
Seems like that VSCode can't do it (from the box) and all people waiting for that feature.
I was looking for a way to do that too as I put way too many comments making it hard to debug... and I came across this https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-hide-comments it makes all the comments invisible, but it leaves special characters in place. There are also commands to toggle show/hide.
Hide Comments - Visual Studio Marketplace
We now have an extension for that. On the editor title, a toggle action is available to show/hide the comments quickly.
You can download from inside Visual Studio 2022 called unobtrusive code and it will hide all comments and put "+" symbols on the collapsed line to the left of your code that you can open or close them with. It works great.
*** TO GET THE EXTENSION: ***
I went to the Extensions menu at the top of VS 2022 and chose manage extensions.
Then in the manage extensions window that opens up, choose online then Visual Studio Marketplace. In the search at the top right of the manage extensions window type in unobtrusive code. download it and then exit Visual Studio. You should see a window pop up to install it.
When you start VS 2022 again and open a C# script, it should have all the comments minimized to the "plus symbols" to the left of the code!
Hope it works for anyone wanting to hide their comments.
according to the documentation here I can add multiple cursors in visual studio code by using alt+Click in the editor. Sadly alt+drag is already used by the window manager to move the window around, so visual-studio-code does not get any key events. So how do I change that keyboard configuration in visual studio code? I could not find anything in the default key combinations file.
I am not looking for solution that changes my window manager, I really like that behavior and use it very frequently already for a very long time.
The easiest way in my opinion is:
From the top-level menu, click on
Selection -> Switch to Ctrl+Click for Multi-Cursor
Then you can use Ctrl+Click rather than Alt+Click.
You can see where this is in this screenshot:
My VSCode version is 1.24.1
There is currently no way to do this but already an open issue on GitHub which addresses that.
Is there a way to make VS2012 IntelliSense Suggestion Mode permanent, by maybe setting it somewhere in TOOLS -> Options? Or maybe by setting it somewhere in the registry?
I really like the concept, and it makes TDD a lot easier if you know IntelliSense won't auto-complete your new class names. However, VS2012 doesn't always remember this setting on new solutions/projects.
You can change between the Completion Mode and Suggestion Mode in Visual Studio 2012 by pressing Strg + Alt + Space. This toggles between those two modes.
Or you can change it using Edit -> IntelliSense -> Toggle Completion Mode.
Currently there is no way to make the Suggestion Mode as default for all projects.
MSDN lists the Devenv Command Line Switches of which /Command switch can be used to solve this problem.
Append /Command "Edit.ToggleCompletionMode" to the shortcut's Target property.
Or launch Visual Studio from the command line with: devenv /Command "Edit.ToggleCompletionMode"