[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: delete-selection-mode on viper
From: |
Le Wang |
Subject: |
Re: delete-selection-mode on viper |
Date: |
Fri, 7 Jan 2011 16:17:58 +0800 |
Here are steps I would take to try to trouble-shoot in Emacs.
emacs -Q
<C-h>fdelete-selection-mode<C-x>o<tab><enter>
Reading commentary at beginning of source ...
This seems promising:
;; Commands which will delete the selection need a 'delete-selection
;; property on their symbols; commands which insert text but don't
;; have this property won't delete the selection.
google "emacs how to set property on command"
Find out
put is a built-in function in `C source code'.
(put SYMBOL PROPNAME VALUE)
Store SYMBOL's PROPNAME property with value VALUE.
It can be retrieved with `(get SYMBOL PROPNAME)'.
Fire up viper mode (I don't use it).
<C-h>k[paste key cord]
Jot down what the command name. Try something like:
(put '[viper-paste-func] 'delete-selection t)
<C-x><C-e>
See if it worked. If it did, add the "(put ..." line to your .emacs.el
On Fri, Jan 7, 2011 at 9:29 AM, Maindoor
<sanjeevfiles@yahoo.com> wrote:
Hi,
I am using viper in emacs, as I come from a vim background.
When using regular emacs delete-selection-mode works fine,
but when I use the viper mode, the paste does not work as
expected. I'm sure others would have faced this issue too,
any suggestions on how to workaround this ?
Thanks,
--
Le