Blob


1 # mg -- micro emacs
3 mg is an Emacs clone. Well, it's more minimal, it doesn't have any
4 scripting language etc, but it has mostly the same keybindings as Emacs.
5 Having it in base on OpenBSD is a Godsent.
7 set-fill-column 72
8 meta-key-mode
10 Set some defaults. `meta-key-mode' in particular is incredibly helpful
11 because it allows to enter non-ASCII characters. mg still doesn't know
12 how to render those (so you get "\303\250" instead of รจ), but at least
13 you can input them!
15 backup-to-home-directory
17 I don't like to have the whole filesystem dirtied by all those backup
18 files. This moves them in ~/.mg.d in case I need them.
20 define-key compile "n" next-line
21 define-key compile "p" previous-line
22 define-key compile "q" delete-window
24 Mg doesn't have many (any?) keybindings defined in compile-mode. This
25 turns it into something that resambles Emacs a bit more and it's
26 handier.
28 global-set-key "\^cm" compile
29 global-set-key "\eg\eg" goto-line
31 compile is handy to have and while here bind "M-g M-g" to goto-line,
32 just as in Emacs.
34 auto-execute *.[ch] c-mode
35 auto-execute *.[ch] auto-fill-mode
37 auto-execute README* auto-fill-mode
38 auto-execute *.txt auto-fill-mode
39 auto-execute *.md auto-fill-mode
40 auto-execute *.[1-9] auto-fill-mode
42 auto-execute * auto-indent-mode
44 `auto-execute' is similar to add-hook. Set some default stuff for files
45 matching those patterns.