On Fri, Aug 10, 2012 at 06:32:26AM -0700, Axel wrote:
> Please have a look at "http://www.sublimetext.com/";; watch the video at 
> positions 1/6 and 2/6. Could that be implemented in GVim? (yes, you could 
> probably implement this with some macro of sorts, but this feels pretty cool).

The good news is that all of the cool things featured in all six of
those videos can be done with vanilla out-of-the-box Vim.

Video 1
=======
This can be achieved by using line ranges with the :s
command.  For example,

:%s/len/length

does exactly what the video shows.

:help range
:help :s

Video 2
=======
This can be achieved in a number of ways in vanilla
Vim.  You could use the :s command with line ranges:

:%s/.*/"&",/

Or you could use Visual Block mode to simultaneously edit all seven
lines at once.

:help blockwise-operators

Video 3
=======
The "Command Palette" featured in video 3 is basically the same thing
as Vim's Ex commands.

:help Cmdline-mode

Videos 4&5
==========
The "Goto Anything" feature can be achieved in Vim with a tags file.

:help tags

Video 6
=======
Finding & replacing with regular expressions is Vim's bread and
butter.  Most Vim noobs I encountered who don't know 1/10th of Vim's
power usually have this technique mastered.  And in Vim you don't even
have to take your hand off the keyboard to click a "Find All" button ;)


I'm not saying this to tear down Sublime Text in any way; it does look
like a well-thought-out editor.  It handily beats Vim in the eye-candy
department.  The minified preview of your file on the right-hand side
is something I've often wished for in Vim.

On the other hand, after 20+ years of development, Vim has left very
few stones unturned so far as productivity is concerned.  All of the
features listed on Sublime's homepage are already built into Vim:

Distraction Free Mode => :set guioptions=
Split Editing => :help window
Instant Project Switch => :help session
Plugin API => Thousands of Vimscript plugins on vim.org and bindings
    for Lua, MzScheme, Perl, Python 2 & Python 3, Ruby and Tcl.
Customize Anything => yeah, Vim has that.
Cross Platform => Vim is available on more than three platforms.

Don't dismiss this as the rant of a crusty old curmudgeon.  Learn to
use Vim's text-objects and you, too, will never be impressed by
another text editor ever again!

-- 
Erik Falor                                       http://unnovative.net
Registered Linux User #445632                  http://linuxcounter.net

Attachment: signature.asc
Description: Digital signature

Raspunde prin e-mail lui