Blame


1 586f1884 2022-05-23 op # mg -- micro emacs
2 586f1884 2022-05-23 op
3 586f1884 2022-05-23 op mg is an Emacs clone. Well, it's more minimal, it doesn't have any
4 586f1884 2022-05-23 op scripting language etc, but it has mostly the same keybindings as Emacs.
5 586f1884 2022-05-23 op Having it in base on OpenBSD is a Godsent.
6 586f1884 2022-05-23 op
7 586f1884 2022-05-23 op set-fill-column 72
8 586f1884 2022-05-23 op meta-key-mode
9 586f1884 2022-05-23 op
10 586f1884 2022-05-23 op Set some defaults. `meta-key-mode' in particular is incredibly helpful
11 586f1884 2022-05-23 op because it allows to enter non-ASCII characters. mg still doesn't know
12 586f1884 2022-05-23 op how to render those (so you get "\303\250" instead of รจ), but at least
13 586f1884 2022-05-23 op you can input them!
14 586f1884 2022-05-23 op
15 586f1884 2022-05-23 op backup-to-home-directory
16 586f1884 2022-05-23 op
17 586f1884 2022-05-23 op I don't like to have the whole filesystem dirtied by all those backup
18 586f1884 2022-05-23 op files. This moves them in ~/.mg.d in case I need them.
19 586f1884 2022-05-23 op
20 586f1884 2022-05-23 op define-key compile "n" next-line
21 586f1884 2022-05-23 op define-key compile "p" previous-line
22 586f1884 2022-05-23 op define-key compile "q" delete-window
23 586f1884 2022-05-23 op
24 be47bd9f 2022-05-24 op Mg doesn't have many (any?) keybindings defined in compile-mode. This
25 586f1884 2022-05-23 op turns it into something that resambles Emacs a bit more and it's
26 586f1884 2022-05-23 op handier.
27 586f1884 2022-05-23 op
28 586f1884 2022-05-23 op global-set-key "\^cm" compile
29 586f1884 2022-05-23 op global-set-key "\eg\eg" goto-line
30 586f1884 2022-05-23 op
31 586f1884 2022-05-23 op compile is handy to have and while here bind "M-g M-g" to goto-line,
32 586f1884 2022-05-23 op just as in Emacs.
33 586f1884 2022-05-23 op
34 4ed09d7e 2023-04-18 op global-set-key "\e," pop-tag-mark
35 4ed09d7e 2023-04-18 op
36 4ed09d7e 2023-04-18 op Emacs has M-, to pop the tag mark, less differences to remember.
37 4ed09d7e 2023-04-18 op
38 350bc465 2022-12-31 op global-set-key "\eZ" zap-up-to-char
39 350bc465 2022-12-31 op
40 350bc465 2022-12-31 op Handier than zap-to-char (M-z) most of the times.
41 350bc465 2022-12-31 op
42 586f1884 2022-05-23 op auto-execute *.[ch] c-mode
43 586f1884 2022-05-23 op auto-execute *.[ch] auto-fill-mode
44 586f1884 2022-05-23 op
45 4ed09d7e 2023-04-18 op auto-execute README auto-fill-mode
46 586f1884 2022-05-23 op auto-execute *.txt auto-fill-mode
47 586f1884 2022-05-23 op auto-execute *.md auto-fill-mode
48 586f1884 2022-05-23 op auto-execute *.[1-9] auto-fill-mode
49 586f1884 2022-05-23 op
50 4ed09d7e 2023-04-18 op #auto-execute *.lua set-tab-width 3 # not yet...
51 4ed09d7e 2023-04-18 op auto-execute *.lua no-tab-mode
52 586f1884 2022-05-23 op
53 586f1884 2022-05-23 op `auto-execute' is similar to add-hook. Set some default stuff for files
54 586f1884 2022-05-23 op matching those patterns.
55 4ed09d7e 2023-04-18 op
56 4ed09d7e 2023-04-18 op set-default-mode indent
57 4ed09d7e 2023-04-18 op set-default-mode ep # my extension
58 4ed09d7e 2023-04-18 op
59 4ed09d7e 2023-04-18 op Default modes to apply everywhere