I suggest you ...

Bring back Macros

I am amazed you've decided to remove Macros from Visual Studio. Not only are they useful for general programming, but they're a great way to be introduced to the Visual Studio APIs.

If you are unwilling to put in the development time towards them, please release the source code and let the community maintain it as an extension.

4,030 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    cpmcgrathcpmcgrath shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    Anonymous shared a merged idea: Macros on debugging  ·   · 
    Todd CarterTodd Carter shared a merged idea: Bring Back Macro Support in VS 2012  ·   · 
    WaldyrWaldyr shared a merged idea: Bring back the Macros support on Visual Studio  ·   · 

    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.

    468 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • TorbjörnTorbjörn commented  ·   ·  Flag as inappropriate

        Please, please bring back Macros. Are you not using them/missing them yourself? Are your devs really part of the 99%?

      • Klaus Wenzel JørgensenKlaus Wenzel Jørgensen commented  ·   ·  Flag as inappropriate

        Please add the Macro feature again. For many of us its important. Perhaps you could just add is an option, feature but not displaying it in any menus.
        Like many other features are hidden as default, the users which are happy for this feature will easily be able to display the toolbar and menu items if wanted.
        I'm just so tired of copying code to notepad++ for doing my text manipulation.

      • J GammonJ Gammon commented  ·   ·  Flag as inappropriate

        I regularly use keystroke record and playback in two scenarios: 1) when processing long tables (mass editing a long XML file, data file, etc.), applying the same keystrokes to each row; and 2) when placing cursor at some word and then manipulating text around it, which I do primarily while editing API documentation in code files. The table-processing macros are typically temp macros that I use once and never again. The other macros I use over and over, so to be useful they should be saved and assignable to different keys so that each one is a single keystroke away.

      • AnonymousAnonymous commented  ·   ·  Flag as inappropriate

        I don't use 'scripting' anywhere near as much as I use keystroke record and playback. When I do use scripting, it is primarily to 'loop' the playback, stopping when a find fails or when the end of a document is reached.

        The only other script I use semi-regularly (nowhere near as often as record and playback) is one that sorts a multi-line selection alphabetically.

      • Janos SzuromiJanos Szuromi commented  ·   ·  Flag as inappropriate

        I used to record some modification once and replay it many times. For example copy-paste DirectX error codes and descriptions from MSDN Library to my code, and create an array of structure which holds the HRESULT value, the short "name" and the description of each error. This was much faster with the macros, now if i have such a task to do, i have to do all the work on each line.
        Please, if you don't want to spend any time improving or bug-fixing the existing macro handling part, just put it back as it is. It is good and very usable that way too.
        Of course, the best would be if you could release the source.

      • Gary GalambosGary Galambos commented  ·   ·  Flag as inappropriate

        Macros have been a basic staple of any decent editor for the last 30 years, and I have been using them for that long. I do not consider it a "nice to have" feature, but a "must have".
        I cannot take serious any editor today that does not support them.
        Do we have to go back to the days when we used our own editors to develop in Microsoft languages? I remember those days, and now feel I need to re-visit those old practices. What a step backwards and what a shame!!

      • Don StockDon Stock commented  ·   ·  Flag as inappropriate

        Here are all my macros which I apparently can't run anymore. I most miss being able to insert an empty braces block and add braces around a code block, each with a single keystroke.

        Option Strict Off
        Option Explicit Off
        Imports System
        Imports EnvDTE
        Imports EnvDTE80
        Imports EnvDTE90
        Imports System.Diagnostics

        Public Module RecordingModule

        Sub SelectedBlock()
        DTE.ActiveDocument.Selection.Cut()
        DTE.ActiveDocument.Selection.LineUp()
        DTE.ActiveDocument.Selection.EndOfLine()
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "{"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "}"
        DTE.ActiveDocument.Selection.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstColumn)
        DTE.ActiveDocument.Selection.Paste()
        DTE.ActiveDocument.Selection.EndOfLine()
        End Sub
        Sub SelectedControlBlock()
        DTE.ActiveDocument.Selection.Cut()
        DTE.ActiveDocument.Selection.LineUp()
        DTE.ActiveDocument.Selection.EndOfLine()
        DTE.ActiveDocument.Selection.Text = "{"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "}"
        DTE.ActiveDocument.Selection.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstColumn)
        DTE.ActiveDocument.Selection.Paste()
        DTE.ActiveDocument.Selection.EndOfLine()
        End Sub
        Sub EmptyBlock()
        DTE.ActiveDocument.Selection.EndOfLine()
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "{"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "}"
        DTE.ActiveDocument.Selection.LineUp()
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Indent()
        End Sub
        Sub EmptyControlBlock()
        DTE.ActiveDocument.Selection.EndOfLine()
        DTE.ActiveDocument.Selection.Text = "{"
        DTE.ActiveDocument.Selection.NewLine(2)
        DTE.ActiveDocument.Selection.Text = "}"
        DTE.ActiveDocument.Selection.LineUp()
        DTE.ActiveDocument.Selection.Indent()
        End Sub
        Sub CopyWord()
        DTE.ExecuteCommand("Edit.SelectCurrentWord")
        DTE.ActiveDocument.Selection.Copy()
        DTE.ActiveDocument.Selection.CharRight()
        DTE.ActiveDocument.Selection.CharLeft()
        End Sub
        Sub ReplaceWord()
        DTE.ExecuteCommand("Edit.SelectCurrentWord")
        DTE.ActiveDocument.Selection.Paste()
        End Sub
        Sub CloseNonFileWindows()
        DTE.Windows.Item(Constants.vsWindowKindProperties).Close()
        DTE.Windows.Item(Constants.vsWindowKindResourceView).Close()
        DTE.Windows.Item(Constants.vsWindowKindToolbox).Close()
        DTE.Windows.Item(Constants.vsWindowKindMacroExplorer).Close()
        DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer).Close()
        DTE.Windows.Item(EnvDTE80.WindowKinds.vsWindowKindBookmarks).Close()
        DTE.Windows.Item(Constants.vsWindowKindCallStack).Close()
        DTE.Windows.Item(Constants.vsWindowKindOutput).Close()
        DTE.Windows.Item(EnvDTE80.WindowKinds.vsWindowKindErrorList).Close()
        DTE.Windows.Item(Constants.vsWindowKindFindResults1).Close()
        DTE.Windows.Item(Constants.vsWindowKindFindResults2).Close()
        DTE.ExecuteCommand("Debug.Breakpoints")
        DTE.Windows.Item("{BE4D7042-BA3F-11D2-840E-00C04F9902C1}").Close()
        DTE.ExecuteCommand("View.ObjectBrowser")
        DTE.Windows.Item("Object Browser").Activate()
        DTE.ActiveWindow.Close(vsSaveChanges.vsSaveChangesNo)
        End Sub
        Sub CloseNonFileWindowsRunMode()
        DTE.ExecuteCommand("Debug.Watch")
        DTE.Windows.Item(Constants.vsWindowKindWatch).Close()
        DTE.ExecuteCommand("Debug.Memory1")
        DTE.Windows.Item("{350F9856-A72B-11D2-8AD0-00C04F79E479}").Close()
        End Sub
        Sub CopyWordAndFindNext()
        DTE.ExecuteCommand("Macros.MyMacros.RecordingModule.CopyWord")
        DTE.ExecuteCommand("Edit.FindNextSelected")
        End Sub
        Sub CopyWordAndFindPrev()
        DTE.ExecuteCommand("Macros.MyMacros.RecordingModule.CopyWord")
        DTE.ExecuteCommand("Edit.FindPreviousSelected")
        End Sub
        End Module

      • Jim RiesJim Ries commented  ·   ·  Flag as inappropriate

        Keystroke macros are a must! What kind of editor does not have keystroke macros!? This is absurd!

      • Anonymous commented  ·   ·  Flag as inappropriate

        Speaking personally, all I really need is a keyboard record/playback facility that is guaranteed to produce the same results as typing manually (even with 'helpful' autocompletion and intellisense features running). This would help tremendously when, for example, you are reformatting a 1000-line table of data and need to perform the same keystrokes on each line. The only other option is to throw a console app together (which may well take longer) or to just sit and do it. This is one thing that the Delphi IDE gets exactly right!

        Yes - features like scripting support or multi-macro storage would be nice. But not as time-saving as a simple macro feature.

      • AA commented  ·   ·  Flag as inappropriate

        What you need to do is bring the old Marco system up to data and put it back in.

        ps. I would sign if if your page supported windows live login (or whatever its called these day)s

      • Martin CrimesMartin Crimes commented  ·   ·  Flag as inappropriate

        Quick Macros - Ctrl-Shift-R/Ctrl-Shift-P is something I used a LOT under VS2010 for various tasks. It was a real omission from 2012 and it's frankly the only reason I still have 2010 installed. I keep meaning to learn how to do the same thing with other tools like AutoHotKey, but having it baked into the UI just made things much simpler.
        I rarely saved and re-used macros, so personally I'm most bothered by quick macros if you're limited on time to implement the feature, but I daresay many other may want the full saving & editing of macros which used to be available.

      • SalomaoSalomao commented  ·   ·  Flag as inappropriate

        That's right microsoft folks. It's a shame that you guys removed something so useful that many intelligent people are desperate to have it back!!!

      • Дмитрий ИлюхинДмитрий Илюхин commented  ·   ·  Flag as inappropriate

        Unpleasantly surprised by the absence of scripting capability of Visual Studio 2012. I've head about MS usage statistics said that macros used less than 1%? Ummm maybe. I am using this feature less than 1% of my work too. But! Ability to automate work is kind of sharp edge of a sword - weight less than 1%, but without it sword is just blunt. Microsoft, you just blunted your sword.

      • Brian PostlethwaiteBrian Postlethwaite commented  ·   ·  Flag as inappropriate

        I use it for quick recording and playback of repetitive actions, Ctrl+r ctrl+p
        Glad there are Addis that fill this void now...

      • Jim ScottJim Scott commented  ·   ·  Flag as inappropriate

        removing macros is the stupidest thing microsoft has ever done. I am still using 2010 and using macros many times every day. I will not switch to a newer version until my company forces me to.

      • Ergin SalihErgin Salih commented  ·   ·  Flag as inappropriate

        John, I don't think you understand why so many people love macros, yes, you can do a most things with command based functionality but pure keystroke recording and playback is so powerful to many people.

        In previous versions of VS I created so many little macros that just helped me do my job, not to mention those reformatting nightmares that can only be done with a keystroke macro. Additionally, the record feature gives people that boost into macros that would otherwise be a daunting challenge, not everyone wants to wade through pages and pages of documentation to learn an alien scripting language just to be a little more productive.

        My (and I would suggest most peoples) modus operandi is to record a macro, play it back and then adjust it to become more useful or generic; and as an added bonus/side effect you start learning the language and paradigms off the bat.

      1 2 5 7 9 23 24

      Feedback and Knowledge Base