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

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

Re: How to add VIM * functionality in EMACS VIPER mode?


From: Weihua JIANG
Subject: Re: How to add VIM * functionality in EMACS VIPER mode?
Date: Sun, 6 Nov 2005 10:32:51 +0800

Lennart,
 
Another question about viper: how to change the key for viper modes change? The default one is C-z and I set variable  viper-toggle-key  to "\C-q" in my .viper file. However, now both C-z and C-q is able to switch between viper modes. But, my hope is to bind C-z to undo as CUA mode does!
 
My environment: emacs 22.0.50 CVS + CUA mode enabled!
 
Anyone can give a help?
 
Thanks,
Weihua Jiang

 
2005/11/6, Lennart Borgman <lennart.borgman.073@student.lu.se>:
Nice. Maybe I as a die hard viper user also should say that I often use
C-s to search too. It is very handy when you want to read information. I
very often use C-s in Info for example.


Weihua JIANG wrote:

> Lennart,
>
> Thank you very much! Now I have the * functionality in VIPER mode.
> Below is my code:
>
>  (defun search-at-point ()
>     "Put symbol at current point into search string."
>     (interactive)
>  (setq viper-s-string (concat "\\<" (symbol-name (symbol-at-point))
> "\\>"))
>  (setq viper-s-forward t)
>  ;; TODO: Handle case where symbol-at-point returns nil.
>  (viper-search  viper-s-string viper-s-forward 1))
>
> (define-key viper-vi-global-user-map (kbd "*") 'search-at-point)
>



reply via email to

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