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

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

Re: viper question


From: austin . wood
Subject: Re: viper question
Date: 6 Aug 2006 15:08:18 -0700
User-agent: G2/0.2

Lennart Borgman wrote:
> smudgef1@yahoo.com wrote:
> > Hello,
> >
> > I'm trying to simulate vim's visual mode in viper. I have been somewhat
> > succesful using the pc-selection-mode. So far I just have
> >
> > (define-key viper-vi-global-user-map (kbd "v") 'forward-char-mark)
> >
> > With this setting, I can then use the viper navigation keys to select
> > more text (very similiar to vim). The only thing I need now is a
> > binding that will bind 'y' to yank the selected text. I need 'y' binded
> > to copy-region-as-kill-nomark (same thing alt-w is binded to), but only
> > when text is selected. Does anyone know how to do this?
> >
> > This should work since the viper key 'p' already pastes what was copied
> > with alt-w.
> >
> > Thanks!
> >
> I do a similar thing with no additional key bindings at all:
>
> 1) I use cua-mode together with viper. I suppose the steps below also
> works with pc-selection-mode, but I am not sure.
> 2) I first select some characters.
> 3) Then I use the normal vi commands (w, j etc) to move the point. The
> selected region is extended as the point move.
> 4) To cut or copy I use "dr" or "yr".
>
> However I am doing this in the not yet released version 22.0.50.1 of
> Emacs. I do not know if it works in older region.

Hey thanks! This works great!



reply via email to

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