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: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 50:51:48 |
Calls: | 10,397 |
Calls today: | 5 |
Files: | 14,067 |
Messages: | 6,417,317 |
Posted today: | 1 |