Tuesday, 20 August 2013

Swap the curly and the square braces in emacs

Swap the curly and the square braces in emacs

Currently in emacs I have to type SHIFT-[ and SHIFT-] to get { and }
respectively. Typing [ and ] yields [ and ] respectively. I want to swap
this behaviour in emacs, namely I want to have:
[ and ] will yield { and }
SHIFT-[ and SHIFT-] will yield [ and ]
This idea is inspired by http://tex.stackexchange.com/a/1985/412
BONUS: I want this behaviour to apply only for certain major modes.

No comments:

Post a Comment