News for hackers. Stuff that matters.
Re:Some things beginners might not know about Sublime Text by taylorbuley on Sunday July 15, 2012 @09:49AM (#4246933)
Is it possible to do multi-line editing like Sublime Text but in Vim? I use both, and this was the feature that got me out of Terminal, but besides this I can't think of anything else offhand for what ST2 can do that Vim can't do.
Re:Some things beginners might not know about Sublime Text by madelfio on Sunday July 15, 2012 @10:20AM (#4246995)
Yes, Ctrl-v to enter visual-block mode, then move up or down to cover all lines where you want to make changes, then I{string}Esc to append a string at the cursor location on all lines.

See: http://vimdoc.sourceforge.net/htmldoc/visual.html#blockwise-...

Re:Some things beginners might not know about Sublime Text by mvgoogler on Sunday July 15, 2012 @03:46PM (#4247864)
Doesn't block mode only work for blocks within contiguous lines of code? (basically it will let you select a rectangular section of code)

ST2 allows multiple cursors in arbitrary locations - I'm not aware of another editor that supports that.

Re:Some things beginners might not know about Sublime Text by jagira on Sunday July 15, 2012 @04:22PM (#4247961)
There is a vim plugin that provides arbitrary multiple line edit.

https://github.com/alfredodeza/plexer.vim

Re:Some things beginners might not know about Sublime Text by alphabethos on Sunday July 15, 2012 @05:32PM (#4248226)
I'm not sure exactly what you're looking for without knowing more what you mean by multi-line editing, but you can apply arbitrary commands (including inserts) to any set of lines.

Switches case on lines 4, 15:

:4,15 norm ~

Indents text and changes the first two words of ever line to "duck" from mark a to the end of the file

:'a,$ norm >>2cwduck

Prepends a # to every line of the visual selection

:'<'> norm I#

Applies regex to lines that match a regex

:g/ducks/ s/moo/quack