help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Automatic closing braces


From: Alberto Simões
Subject: Automatic closing braces
Date: Sun, 24 Jun 2007 21:04:53 +0100
User-agent: Thunderbird 2.0.0.4 (Macintosh/20070604)

Hi.

I have this in my .emacs:

(setq skeleton-pair t)
(global-set-key "(" 'skeleton-pair-insert-maybe)
(global-set-key "[" 'skeleton-pair-insert-maybe)
(global-set-key "\"" 'skeleton-pair-insert-maybe)
;; (global-set-key "'" 'skeleton-pair-insert-maybe)
(global-set-key "{" 'skeleton-pair-insert-maybe)

and it works in all modes except (that I have noticed) in CPerl.
Is there any way to make it work?

Also, I was trying textmate and although I didn't like it much, it has some things I like, and one is very related to these automatic closing braces, so here is the question...

In textmake, when I have {} and the cursor between, if I type RETURN, it does:

  {
      |
  }

Where | is the cursor. That is, it starts a new block, and indents the cursor.

Is there any easy way to mimic this behaviour under emacs?

Thank you
Alberto

--
Alberto Simões - Departamento de Informática - Universidade do Minho
                 Campus de Gualtar - 4710-057 Braga - Portugal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]