From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help Subject: Re: How to add VIM * functionality in EMACS VIPER mode? Date: Sun, 06 Nov 2005 03:12:25 +0100 Message-ID: <436D6689.1090604@student.lu.se> References: <1131238350.577918.73380@f14g2000cwb.googlegroups.com> <266164370511051655y10956964p@mail.gmail.com> <436D5C27.1050707@student.lu.se> <266164370511051801n8fd4980o@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1131243194 16905 80.91.229.2 (6 Nov 2005 02:13:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 6 Nov 2005 02:13:14 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 06 03:13:11 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EYa1N-0003Q5-Tn for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Nov 2005 03:12:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EYa1M-00008N-W0 for geh-help-gnu-emacs@m.gmane.org; Sat, 05 Nov 2005 21:12:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EYa1F-000088-I5 for help-gnu-emacs@gnu.org; Sat, 05 Nov 2005 21:12:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EYa1E-00007u-3W for help-gnu-emacs@gnu.org; Sat, 05 Nov 2005 21:12:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EYa1D-00007r-VO for help-gnu-emacs@gnu.org; Sat, 05 Nov 2005 21:12:28 -0500 Original-Received: from [81.228.8.164] (helo=pne-smtpout2-sn2.hy.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EYa1D-0001Cu-R2 for help-gnu-emacs@gnu.org; Sat, 05 Nov 2005 21:12:28 -0500 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout2-sn2.hy.skanova.net (7.2.060.1) id 4365DD8D0019AFA4; Sun, 6 Nov 2005 03:12:26 +0100 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: Weihua JIANG In-Reply-To: <266164370511051801n8fd4980o@mail.gmail.com> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:30854 Archived-At: 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) >