Simultaneous Editing for Visual Studio with the free MultiEdit extension
I use a number of text editors. The three I have pinned to my taskbar are Visual Studio, Sublime Text 2, and Notepad 2.
I have three because I like features from one and wish those features were in another.
Sublime Text (and a few other editors) has a great feature called Simultaneous Editing. It's the very definition of an advanced - but core - editor feature.
Enter the MultiEdit extension for Visual Studio. Holding down ALT while mouse-clicking in the editor will add multiple selection points, so when you type, text will be added to all the selected positions. So today, MultiEdit supports multiple carets, but not multiple selections.
Here's an animated gif of MultiEdit in action.
This wonderful MultiEdit extension was released by the Visual Studio "Core Editor" Program Manager Ala Shiban (@AlaShiban). I'd like you guys to encourage our new friend with good reviews and nice comments if you like it. If you find a good bug, offer a clear bug report.
Perhaps if this thing gets a few hundred thousand downloads, we can get some new features, updates and more importantly show Ala's boss and make it a real live built-in feature. ;)
Version 1.0 supports:
- Typing
- Backspacing / Deleting
- Moving the caret around using the keyboard
- Undo-ing
What isn't supported:
- Multiple selections
- Virtual Spaces
Go get MultiEdit now for Visual Studio 2012 and then share it with all your friends.
Even better, perhaps we'll see even more "power toys" from the Core Editor team.
What would you like to see?
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
Yes, this is nice. Though for productivity I'd look more at something like R#.
I rather choose the SyncEdit mode as below,
http://www.skorkin.com/2011/06/how-to-implement-the-sync-edit-feature-from-delphi-ide-inside-visual-studio-ide-using-dxcore/#.URMV7idqnwk
This is a MultiEdit tool not a refactoring one ;)
If you look at the Mac application SubEthaEdit, this is what I am thinking off. Would be great for pair programming when not at the same location. With a little bit of solution syncing multiple people could work at the same project, even in the same classes in real time.
The next step would be a remote-via-linked-VS-debugger, so that one person on his mashine is debugging, and I can join the very same debugging session, have all output (Trace, Immediate window) locally while inspecting his problem and hinting him.
Can't wait for the 2010 version (or for my employer to upgrade to 2012)
:%s/search/replace
Where 'search' will be replaced with 'replace'. Optionally using /g or /c depending on what I wanted to achieve.
Yes, VIM is great and can do this. Lots of VS users do not use VIM though.
Yes, it's currently only for VS2012. Lots of VS users are < 2012. Why not contact the author and offer some support to see if it can be extended for use on 2010?
Works great on my machine!
Although, I noticed R# can do Multiple Selections, but I couldn't figure out if it could do the Multiple Selection Points. But now, with the MultiEdit extension, I have both!
I haven't installed this extension but from the demo above I think it would be nice if it could keep the text being typed highlighted for a bit of time (or until clicked elsewhere) to preview the multi-change.
Thanks!
For those unfamiliar with alt+drag you can select a block of code in Visual Studio, or a sliver. Here's an example of how selecting a sliver can save keystrokes. Say I have this code, and I want to make these properties public:
string Foo { get; set; }
int Bar { get; set; }
I can select the vertical sliver before "string" and "int" by holding down alt, then click dragging from in front of the "s" of string straight down to the "i" of int. Now that the invisible space before both of those lines is selected I can type "public ", and the result will look like this:
public string Foo { get; set; }
public int Bar { get; set; }
Hope that makes sense. I'm sure an animated gif would be easier to understand :)
Add me to the list of people who'd love a VS2010 version of MultiEdit.
I am all for this trend. Faster releases of smaller units that give us new capabilities (or the ability to create or incorporate new capabilities) without waiting years between releases.
Thanks Ala and team!
Please somebody show me example when this addon is useful.
In other editors I can see the complete revision history of a file (for the edits I did). I can go back and selectively pick bits to put back, merge in old lines, even recover the entire file, compare versions etc.
This has saved me from many oops; big and small
This is in addition to source control.
Plus the context swicth of going to the mouse, holding Alt and inserting the seletion point requires lot of precision, counteracting the proposed ease this feature is supposed to bring.
Between the smart action and Ctrl+H or Ctrl+Shift+H, I've never really missed this capability.
The feature is called "Multi Editing" and IMO is even more flexible than in all of the aforementioned editors because it permits to make arbitrary text selection choices sparsely.
Scott, by the way, why one cannot log into the comments section using Twitter or Facebook?
I will definitely recommend it and hope for that rename feature.
notepad ++ with all its plugins became the most kick ass editor for me as developer .
Normally when you share you provide solid real examples of why what you are sharing is useful to you. However here you didn't do any of that, and the example provided is pedantic and not real world at all.
Real-Time Live Collaboration/Simultaneous Editing IN Visual Studio is support by VS Anywhere Add-In for Visual Studio 2010/2012/2013, is not just limited to code as you can work on design view for XAML/WPF, Windows Forms, HTML and ASPX , support to share a full solution, a project or a isolated file, has support for Lync and TFS, including using them as Credentials Providers, integrates with Skype for VoIP and has other interesting features, like for instance integration with Github (and soon with other Social Coding providers)
you can see VS Anywhere in action here: http://www.youtube.com/watch?v=f7epkbVuEYc
the web site is https://vsanywhere.com
Hope this information is a helpful for all you looking for this kind of features,
Regards
Jesus
VS Anywhere
Comments are closed.