Christoph Martel wrote:
One of the charming features of Emacs is hitting Shift-Meta-( and
inserting a closed pair of parentheses (). However, Emacs inserts a
space before the opening ( and after the closing ). Can I somehow tell Emacs at least not to do the opening space, so I could type "testShift-Meta-(" and get "test()"? It would be even more helpful, if
the cursor could be placed between ( and ).
I'd appreciate every hint,
Chris
In my .emacs I have
(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)
Then it' enough to enter a "(" only and to get automically the pair of parentheses with the cursor placed between.
--
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 374 |
Nodes: | 16 (2 / 14) |
Uptime: | 08:08:47 |
Calls: | 7,975 |
Calls today: | 4 |
Files: | 13,017 |
Messages: | 5,819,862 |