A general solution to the need to insert a number of Unicode chars quickly is to define a command for each, dedicated to inserting it, and bind that command to a simple key sequence.
That is, in effect, what @abo-abo and @Iqbal have offered you, in the form of:
(lambda () (interactive) (insert "§")))
If you have multiple such chars that you want to create such commands for, then
library ucs-cmds.el
can help -- in two ways:
It provides a macro, ucsc-make-commands
, that lets you, in one fell swoop, define commands for whole ranges of Unicode chars. For example:
(ucsc-make-commands "^cjk")
defines an insert-char command for each Chinese, Japanese, and Korean Unicode character.
(ucsc-make-commands "^greek [a-z]+ letter")
does the same for each Greek letter.
(ucsc-make-commands "arabic")
does the same for each Arabic character.
It provides a replacement command (ucsc-insert
) for C-x 8 RET
, which acts exactly the same as the vanilla command (insert-char
), except that if you give it a negative prefix argument then it not only inserts the char you choose but it also creates an insertion command for it (i.e., the kind of command that the macro creates in bulk).
The names of the commands created by macro ucsc-make-commands
and command ucsc-insert
are exactly the same as the Unicode names of the chars themselves, except that they are lowercase and have hyphens (-
) in place of space chars.