From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: rfflrccrd@gmail.com Newsgroups: gmane.emacs.help Subject: Re: mic-paren.el 3.10 available Date: Thu, 26 Jul 2012 08:22:52 -0700 (PDT) Message-ID: <9a1f1ccf-2c1b-49f8-acc4-5965226c21e7@googlegroups.com> References: <2b42c9ad-dbde-41ce-90c5-caef9568a18e@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1343316199 5966 80.91.229.3 (26 Jul 2012 15:23:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 26 Jul 2012 15:23:19 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: gnu.emacs.help@googlegroups.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 26 17:23:19 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SuPuB-0008Uw-Gp for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Jul 2012 17:23:11 +0200 Original-Received: from localhost ([::1]:55862 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuPuA-0003iy-N8 for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Jul 2012 11:23:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuPu2-0003hW-7W for help-gnu-emacs@gnu.org; Thu, 26 Jul 2012 11:23:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuPtt-0002rm-Dp for help-gnu-emacs@gnu.org; Thu, 26 Jul 2012 11:23:02 -0400 Original-Received: from mail-vb0-f61.google.com ([209.85.212.61]:44355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuPtt-0002rf-9c for help-gnu-emacs@gnu.org; Thu, 26 Jul 2012 11:22:53 -0400 Original-Received: by vbzb23 with SMTP id b23so6586973vbz.6 for ; Thu, 26 Jul 2012 08:22:52 -0700 (PDT) Original-Received: by 10.52.155.207 with SMTP id vy15mr3156274vdb.13.1343316172421; Thu, 26 Jul 2012 08:22:52 -0700 (PDT) Original-Path: glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=90.198.51.123; posting-account=iscNFgoAAAANEah9YzNOOYVI-4RgnElR Original-NNTP-Posting-Host: 90.198.51.123 User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 90.198.51.123 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.212.61 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:86075 Archived-At: On 07/26/2012 05:19 AM, Thien-Thi Nguyen wrote:> [NB: CC updated; we use th= e "sources" list to post/announce source code.] >=20 > () Wed, 25 Jul 2012 14:54:57 -0700 (PDT) >=20 > As I use Viper, a Vim-emulation mode, I looked into the customization > group mic-paren-matching, hoping to find a way to emulate the way Vim > uses to highlight parentheses. I found nothing. Do you confirm it > is so? >=20 > No, but that's not saying much -- i don't use Vim. FWIW, my mic-paren > usage is very simple: >=20 > http://www.gnuvola.org/software/personal-elisp/dist/lisp/low-stress/turn-= on-mic-paren.el >=20 > Basically, since Vim uses both a bar cursor and a block cursor, > depending on context it highilights sometimes the parenthesis before > the cursor and sometimes the one after the cursor. >=20 > Could you please give an example or point to one on the net? >=20 Thank you for your prompt reply. I thought that firing up Vim and checking out its behaviour first hand woul= d have been worth a hundred words, but asking an Emacs user to use Vim is r= ude, isn't it? ;-) Jokes apart, I would have liked to record and link a explanatory video, but= I wasn't able to install any desktop recorder on my PC. I'll have to rely = on words. Vim matches brackets in two ways, depending on whether you are typing text = or moving around, as typing text and moving around are two different modes = in Vim. =20 When you are moving around, Vim matches the bracket after point. This beha= viour is crucial because, while moving around, you can't go beyond the last= character on the line: if such character were a bracket, you would not be = able to match it. When you are typing text, Vim matches: - the bracket after point, if there is one; - otherwise the bracket before point, if there is one. Also, Vim always highlights both brackets. Try it with this snippet (trailing whitespace is intentional): ( (()) ) [ [[]] ] Vim also instantly highlights all mismatched closing parentheses, while ign= oring square brackets and curly brackets, at least while editing Lisp code = - which is the only code I edit in Vim - but I think that such behaviour is= beyond the goals of mic-paren anyway. I've noticed that mic-paren ignores curly brackets. This is intentional, I= suppose, as mic-paren targets Lisp code, but if it were able to match curl= y brackets as well, then it would be useful in other programming modes. Have a nice day.