News for hackers. Stuff that matters.
Re:Sublime Text 2.0 Released by bemmu on Tuesday June 26, 2012 @01:55PM (#4163223)
I use ST2 and have been learning about using multiple cursors, but I wonder what kind of things are you doing where that comes in handy? So far I haven't had a chance to use it, especially since there already is a shortcut for commenting things out.
Re:Sublime Text 2.0 Released by amatix on Tuesday June 26, 2012 @04:54PM (#4164053)
Example: Take some log text, where all you're interested in is the messages, and you don't want hostname/date/time/etc cruft.

1. Ctrl+A Select all the lines

2. Ctrl+Shift+L to split into multiple cursors, 1 per line

3. Home/Ctrl+Shift+arrows/etc to select stuff to copy/delete

I find it easier than constructing a regex to pass to find/replace.

Re:Sublime Text 2.0 Released by est on Tuesday June 26, 2012 @08:45PM (#4164959)
> but I wonder what kind of things are you doing where that comes in handy?

so you got some property names like

a

b

c

d

now convert them into ['a', 'b', 'c', 'd']

with ST2, you middle mouse vertical select, ctrl+right, press ', then end, press ,, then del.