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: Lennart Borgman
Subject: Re: How to add VIM * functionality in EMACS VIPER mode?
Date: Sun, 06 Nov 2005 03:12:25 +0100
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

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]