Can I record/play macros in Visual Studio 2012/2013/2015/2017/2019?
Since using Sublime Text I found that there are in fact better ways to edit text than by using macros.
Sublime allows you to to edit your text with multiple cursors at once. It's hard to explain but there are several animations that show it off at http://www.sublimetext.com
I've also added Sublime as an external tool to Visual Studio:
- open Tools/External Tools
- add: Sublime, select the exe and use these arguments: $(ItemPath):$(CurLine):$(CurCol)
- (also move it to the top as this makes the next step easier, otherwise remember its position)
- then go to customize/Keyboard, search for Tools.ExternalCommand1 and add your preferred keyboard shortcut.
This will open the current document in Sublime at the same cursor position that you were in VS.
(also, Sublime can do macros in case you still need them)
In this version of Visual Studio, while there are literally hundreds of features, there are some we’ve actually taken out. One of those is the macros automation feature, including macro record/replay, macro projects and the Macros IDE. While we know that macros have been valuable for those who use them, unfortunately our usage data shows that less than 1% of Visual Studio developers take advantage of this feature. Therefore, we’ve found ourselves investing more deeply in the Visual Studio areas that get used every day, and have not updated macros for several releases.
Source: Macros in Visual Studio 11 Developer Preview
I have started to get around this (although inconvenient) by cutting/pasting into Notepad++, record and run the macro there and then cut/paste it back into Visual Studio 2012.
You can try the Text Macros for Visual Studio 2012-2019 extension (I am the author). It basically does the same thing as the Notepad++ macros (text editing, no UI automation).
The code is open source (GitHub), so feel free to contribute improvements :-)
Stand out and vote for bringing macros back!
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2650757-bring-back-macros
UPDATE (10/4/2013):
Yay! Thank to your votes the macros are now considered for return! Keep pushing!
We are currently reviewing the feasibility of delivering a scripting capability in a future version of Visual Studio. Please continue to offer your comments on what scripting capability we should offer while we research this suggestion.
Tony Goodhew, Program Manager, VS Pro.