help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Viper: replacing text?


From: Lennart Borgman
Subject: Re: Viper: replacing text?
Date: Thu, 3 Sep 2009 23:53:35 +0200

On Thu, Sep 3, 2009 at 9:38 PM, Elena<egarrulo@gmail.com> wrote:
> On 3 Set, 18:38, Sean Sieger
>> But I guess where I'm coming from is the `GNU/Emacs v Vi' thing (I've
>> used Vi, and it seems like a cool text editor) and personally preferring
>> GNU/Emacs and then wondering why on Earth I would then want it to behave
>> like Vi.
>>
>> Essentially.
>
> I understand.
>
> IMO, comparing Vi and Emacs does not make sense. Vi is an editor,
> Emacs is an environment. You can just compare Vi to the default
> editing program run by Emacs. Emacs can also run a Vi-like editor
> (Viper), if you like - I like so ;-)
>
> Indeed Emacs allows you to run two editors at once! (Viper and the
> default one)
>
> BTW, I'm waiting for a pure Viper solution I'm sure Lennart is still
> keeping for him ;-)

I should keep my mouth shut ... ;-)

Now, since I did not this time, let us do a quick comparision with
Sean's suggestion, translating from Emacs default key sequences to
Viper dito:

   M-d
   C-f
   M-d
   C-u 2 C-y

You can do this in a very similar way in Viper (but I do not know if
it is actually worth the effort using and remembering "2P):

   dw (or de, dE, dW, db, dB)
   h
   dw
   "2P

I count it to 11 keyboard hits in Emacs and 8 in Viper... - though I
hardly dare to tell this ... ;-)

Someone may say I am wrong since " and P requires shift on most
keyboards so it is really 10 in Viper...

The real advantage with the Viper keys is in my opinion perhaps that
you use the keyboard keys you reach very fast, ie normal letters. At
least for me reaching Control and Meta is a bit slower.

However in the beginning getting used to the vi modal editing is a bit
hard. (There is a little Viper interactive tutorial, but unfortunately
RMS did not want it to be shipped with Emacs, no idea why now, I have
forgotten. I ship it with nXhtml instead.)

Note that you still have access to most of the Emacs key bindings in
Viper. They are still very useful for more complicated things, but
most Viper users probably never use M-d, C-f etc.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]