I have a large heterogeneously formatted C++ solution and I don't want to press ctrl+E, ctrl+D in all existing source files.
How can I make this automatically?
Related
In Visual Studio Code, when using Ctrl F in a file, the editor shows the "current of total" of the searched string. Is there a way to enable this in Visual Studio 2019?
VS Code:
Visual Studio 2019 Preview:
Instead of Ctrl+F use Ctrl+Shift+F, this will open the Find in Files option, select Current Document and search.
The results will now appear in a new window and you will get the count at the bottom of the window.
I don't think there's an option to show this count in Quick Find, at least not in Visual Studio for Windows. In Visual Studio for Mac this is the default behaviour:
I would like to copy and paste code.
I'm using visual studio 2015 and when I copy code to paste it in open office writter, if a keep it formatted there is no spacing.
I have made the test using productivity power tool and not using it, the result is the same.
Do you have any advice ?
Thank you
For copying formatted code in Visual Studio you can use the corresponding version (2015, 2017, etc.) of Productivity Power Tools extension and then Copy → Paste the code. For copying code as HTML use Edit → Copy Html Markup menu on Visual Studio as well.
There is a post that goes on about Visual Studio with 'intelligent' word wrap in How to make word wrap respect indentation in Visual Studio?
However - its a personal preference and can make code more unreadable in some cases.
In Visual Studio 2013 - this auto-indentation is default behavior.
How do you in Visual Studio 2013 turn this off?, so we get word-wrapping going back to the previous way - all-left aligned?
There doesn't appear to be an option in Visual Studio Options, or maybe I am missing something. If it is missing in Visual Studio Options, does anyone know of an add-in that will reset this auto-indentation?
I have VS2010 but try this:
Options/Text Editor/C#/Tabulations and then at identation block select none.
PS. You have to expand the options, if you select text editor it will show only the general options for text editor.
Is there a way to auto indent (like ctrl+i in MATLAB) FORTRAN code in Visual Studio.
If you are using Visual Studio with the C# keyboard settings, the keyboard shortcut is Ctrl+K followed by Ctrl+F.
To get the full list of predefined shortcuts, see http://msdn.microsoft.com/en-us/library/da5kh0wa.aspx (Edit.FormatDocument). The list has all keyboard shortcuts from Visual Studio 6 to Visual Studio 2013.
Select the code you want to format and press Ctrl+K,F (i.e Ctrl+K then Ctrl+F)
Ctrl+K,D will format the entire document, without changing your cursor position (as Select-All option does).
I wanted to mimic the functionality in Eclipse where you can press CTRL + SHIFT + R to open a file, I read that this is possible but when I opened my own Visual Studio 2010 instance, I noticed that it was not contained in the Show Commands Containing search of the Keyboard options menu.
Has the name of this functionality changed in Visual Studio 2010?
I found Sonic File Finder which does the same thing:
http://www.jens-schaller.de/sonictools/sonicfilefinder/index.htm