News for hackers. Stuff that matters.
Re:My Top Sublime Text 2 Plugins by groovy2shoes on Wednesday January 16, 2013 @10:07PM (#5070702)
Multiple cursors sound cool! In vim, you can do something more limited by using visual block mode (C-v) to insert on multiple lines, but you're restricted to insertion on the same column.

The perhaps the closest thing I can think of for your example would be this (starting in normal mode with the cursor at the beginning of your list):

    f_i_Class<Esc>+;.+;.
("Move forward to the next '_', enter insert mode, insert '_Class', leave insert mode, move down one line to the first non-blank character, repeat the forward motion, repeat the insertion, repeat forward motion, repeat insertion." Vim does have word motions, but it includes underscores as parts of words.)

Edit - formatting and a clarification that it's the closest I can think of (I'm doubtful it's the closest you can get).

Re:My Top Sublime Text 2 Plugins by clscott on Wednesday January 16, 2013 @10:53PM (#5070839)
You wouldn't do the following?

   :% s/_/_Class_/
Explained: On each line replace the first '_' with '_Class_'
Re:My Top Sublime Text 2 Plugins by notJim on Wednesday January 16, 2013 @11:37PM (#5070954)
Yeah, that's totally what you'd do, in either editor. But my broader point is that there are situations where the immediate feedback and interactivity of using multiple cursors is valuable.
Re:My Top Sublime Text 2 Plugins by irahul on Thursday January 17, 2013 @08:11AM (#5072392)
How is immediate feedback and interactivity going to help if the changes span more than one page? If you are going to extrapolate(looks fine on this page, must be fine elsewhere), you can very well extrapolate from a smaller sample size(run :s/some_crap/some_other_crap/gc, check one or two occurrences, then do 'a' for all).
Re:My Top Sublime Text 2 Plugins by imatworkyo on Thursday January 17, 2013 @09:32AM (#5072797)
One can always stop typing and simply scroll down and check.
Re:My Top Sublime Text 2 Plugins by johncoltrane on Thursday January 17, 2013 @05:19AM (#5071892)
I've tried to like it and believe that instant feedback is actually useful but no. I couldn't.
Re:My Top Sublime Text 2 Plugins by jasonm23 on Thursday January 17, 2013 @07:00AM (#5072177)
Emacs IEdit mode has done this for years
Re:My Top Sublime Text 2 Plugins by notJim on Wednesday January 16, 2013 @10:19PM (#5070740)
Yeah, I'd record that as a macro and replay it line by line I think.
Re:My Top Sublime Text 2 Plugins by irahul on Thursday January 17, 2013 @04:24AM (#5071755)
Rather than replaying it line by line, you can play it over a range. If you do this in your vimrc:

    vnoremap @q :normal @q<CR>
You can record the macro in q register, select the visual range, and then do @q to run it over the range. The advantage of doing it thus is you don't have to run the macro manually on every line, and you can undo all change with one u.

Also, normal takes ranges(and not just visual ranges). If you want to run the macro recorded in q over lines 15,49, you can do:

    :15,49normal @q<CR>
I use the same trick for repeating commands over a range too.

    vnoremap . normal .<CR>
As usual, it doesn't have to be visual range. But I mostly use visual ranges, and so I have defined shortcuts for visual ranges.
Re:My Top Sublime Text 2 Plugins by LiveTheDream on Wednesday January 16, 2013 @11:16PM (#5070902)
Macros are the way I solve this as well. A little practice, and you won't even notice the difference. Just hit `Esc j` before ending the macro recording and moving down a line is no longer a problem :)