[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: |
harven |
Subject: |
Re: Don't you think this would be a nice feature? (Place holder) |
Date: |
Sat, 27 Sep 2008 18:01:50 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) |
Weiwei <shuww1980@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.