[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: viper question
From: |
Lennart Borgman |
Subject: |
Re: viper question |
Date: |
Sat, 29 Jul 2006 12:23:47 +0200 |
User-agent: |
Thunderbird 1.5.0.4 (Windows/20060516) |
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.
- viper question, smudgef1, 2006/07/28
- Re: viper question,
Lennart Borgman <=