[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Don't you think this would be a nice feature? (Place holder)
From: |
Weiwei |
Subject: |
Re: Don't you think this would be a nice feature? (Place holder) |
Date: |
Sat, 27 Sep 2008 09:12:13 -0700 (PDT) |
User-agent: |
G2/1.0 |
This small code does exactly what I wanted. Thanks Harven!!!
On Sep 27, 11:01 am, harven <har...@free.fr> wrote:
> Weiwei <shuww1...@gmail.com> 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 "<f4>") 'jump-next-bracket-pair))
>
> This binds the command to the F4 key in tex editing modes only.
> Cheers.