From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: harven Newsgroups: gmane.emacs.help Subject: Re: Don't you think this would be a nice feature? (Place holder) Date: Sat, 27 Sep 2008 18:01:50 +0200 Organization: Guest of ProXad - France Message-ID: References: <5cc115cf-bf80-4675-886c-cb157440fe6e@n38g2000prl.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1222533863 31995 80.91.229.12 (27 Sep 2008 16:44:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Sep 2008 16:44:23 +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 Sep 27 18:45:21 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 1KjcuM-0003ji-L0 for geh-help-gnu-emacs@m.gmane.org; Sat, 27 Sep 2008 18:44:38 +0200 Original-Received: from localhost ([127.0.0.1]:52297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KjctK-0008CS-4K for geh-help-gnu-emacs@m.gmane.org; Sat, 27 Sep 2008 12:43:34 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!feeder.erje.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-b.proxad.net!nnrp20-1.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) Cancel-Lock: sha1:Uqikqqu8A3P+6DC/En7yyNuSdaY= Original-Lines: 22 Original-NNTP-Posting-Date: 27 Sep 2008 18:01:50 MEST Original-NNTP-Posting-Host: 82.240.200.149 Original-X-Trace: 1222531310 news-1.free.fr 22811 82.240.200.149:49840 Original-X-Complaints-To: abuse@proxad.net Original-Xref: news.stanford.edu gnu.emacs.help:162799 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:58140 Archived-At: Weiwei writes: > I'm a Emacs newbie, just jumped into it from Vim. I'm using AUCTeX to > write LaTeX files. In Vim, it has a very nice feature -- placeholder. > For example, you have the following skeleton in inserting figures: My first guess was doing a macro. F3 C-M-s \[\]\|{} RET C-b F4 Unfortunatly it fails on your first example at some point for some strange reason. So here is the lisp code to put in your .emacs: (defun jump-next-bracket-pair () "jump inside the next [] or {}" (interactive) (when (re-search-forward "\\[\\]\\|{}" nil t) (backward-char))) (add-hook 'TeX-mode-hook (lambda () (define-key TeX-mode-map (kbd "") 'jump-next-bracket-pair)) This binds the command to the F4 key in tex editing modes only. Cheers.