From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: some vi equivalents please? Date: Fri, 31 Oct 2008 15:49:08 -0700 (PDT) Organization: http://groups.google.com Message-ID: <623f8526-7e22-4092-b425-62ae4d6982a6@v13g2000pro.googlegroups.com> References: <87mygk670o.fsf@kobe.laptop> <87wsfo4qjh.fsf@kobe.laptop> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1225496450 18129 80.91.229.12 (31 Oct 2008 23:40:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Oct 2008 23:40:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 01 00:41:52 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kw3ck-0003MF-Fh for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Nov 2008 00:41:50 +0100 Original-Received: from localhost ([127.0.0.1]:41298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kw3bd-0000FK-UQ for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Oct 2008 19:40:41 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!v13g2000pro.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 50 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1225493348 4051 127.0.0.1 (31 Oct 2008 22:49:08 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 31 Oct 2008 22:49:08 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v13g2000pro.googlegroups.com; posting-host=24.6.185.159; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:163973 comp.emacs:97305 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:59316 Archived-At: On Oct 31, 10:34 am, Giorgos Keramidas wrote: > On 31 Oct 2008 17:22:15 GMT, Joost Kremers wrote= : > > > Giorgos Keramidas wrote: > >> (global-set-key (kbd "C-c R") 'query-replace-regexp) > >> (global-set-key (kbd "") 'query-replace-regexp) > > > note that query-replace-regexp is already bound to C-M-%. though if > > you use it a lot (i don't) it may be more convenient to choose a less > > demanding key combo. C-M-% requires holding down Control, Alt, Shift > > and '5' simultaneously... > > Ah, I didn't notice `C-M-%'. Thank you. > > On the other hand, in my desktop holding down Alt & Shift at the same > time switches between English and Greek input, so you are right that a > more convenient key is probably going to be nice :-) alternative solution is just to give it a alias. So, i have (defalias 'qr 'query-replace) (defalias 'qrr 'query-replace-regex) Alias makes many frequently used command easy, esp when you already have too many shortcuts to remember or don't have key space. Recently query-replace and query-replace-regex are incorporated into my ergo keyboard with just =E2=80=9CAlt+5=E2=80=9D and =E2=80=9CAlt+Shift+5= =E2=80=9D (e.g. =E2=80=9CAlt+%=E2=80=9D). (see http://xahlee.org/emacs/ergonomic_emacs_keybinding.html ) also, the orignial poster might be interested in: (defalias 'lml 'list-matching-lines) (defalias 'dml 'delete-matching-lines) delete-matching-lines is just a alias to the =E2=80=9Cflush-lines=E2=80=9D = too. The =E2=80=9Cflush-lines=E2=80=9D is a 1980's terminology, it's probably best t= o not spread it. Xah =E2=88=91 http://xahlee.org/ =E2=98=84