The detected or global encoding is stored inside each document.
[mp-5.x.git] / doc / mp_configuration.txt
blobe9aca175ab34dc77c7b1aa9a08cfa1aec3a5406d
1 Minimum Profit Configuration Directives
2 =======================================
4 The following configuration values can be set in the configuration files,
5 executed from the command line or from the `Execute MPSL code...' option in
6 the `Edit' menu. So, for example, if you always want automatic indentation,
7 word wrapping at column 75 and a special ispell command, you can add the
8 following MPSL code to `~/.mp.mpsl' or `/etc/mp.mpsl':
10  mp.config.auto_indent = 1;
11  mp.config.word_wrap = 75;
12  mp.config.ispell_cmd = "aspell -a";
14 All configuration variables are in the `mp.config' hash.
16 mp.config.auto_indent
17 ---------------------
19 Set to 1 if automatic indentation is wanted (default: 0, no indentation).
21 mp.config.auto_sessions
22 -----------------------
24 Set to 1 to automatically load / save sessions on startup / exit (default:
25 0, no automatic sessions).
27 mp.config.case_sensitive_search
28 -------------------------------
30 Set to 1 if searches are to be done in a case-sensitive way (default: 1).
32 mp.config.ctags_cmd
33 -------------------
35 The external command to be executed when a tag search is requested. By
36 default is `ctags *'. Other useful value is `ctags -R', that search for
37 tags recursively in subdirectories.
39 mp.config.eol
40 -------------
42 The end of line character (or characters). By default is "\n". Other useful
43 values are "\r\n" for MSDOS / Windows systems, or "\r" for legacy MacOS
44 systems.
46 mp.config.font_face
47 -------------------
49 The font face to be used in GUI environments. By default it's "Mono" on
50 KDE4 and GTK and "Lucida Console" on MS Windows.
52 mp.config.font_size
53 -------------------
55 The font size to be used in GUI environments. By defaults it's 12 on KDE
56 and GTK and 14 on MS Windows.
58 mp.config.global_replace
59 ------------------------
61 Set to 1 if the _replace_ operation must be done to the end of the file
62 (default: 0, do it only once).
64 mp.config.ispell_cmd
65 --------------------
67 The external command to be executed as a pipe for spellchecking. It must be
68 compatible with `ispell', and by default it's "ispell -a". Other useful
69 values are "aspell -a", if you have `aspell' installed (a better
70 alternative), or "ispell -a -Tutf8", if you happen to be in an UTF-8
71 environment and must use `ispell'.
73 mp.config.local_sessions
74 ------------------------
76 Set to 1 to store session information in the currently working directory
77 instead of in the home directory (default: 0, save sessions in the
78 home directory).
80 mp.config.mark_eol
81 ------------------
83 If set to 1, end-of-line characters are marked with a special character,
84 instead of being invisible (default: 0, don't mark).
86 mp.config.maximize
87 ------------------
89 Set to 1 if the GUI window must open maximized (default: 0, no maximize).
91 mp.config.move_seek_to_line
92 ---------------------------
94 The line number to be set the cursor to when a successful search is hit
95 (default: 5). If set to 0, the position is not touched.
97 mp.config.preread_lines
98 -----------------------
100 The number of lines to read above the first visible line to calculate
101 syntax highlight in blocks (default: 60 lines). There is probably no
102 need to change this, unless using very big comment blocks or the like.
104 mp.config.recursive_grep
105 ------------------------
107 If set, the `grep' action is done recursively (default: 0).
109 mp.config.rw_max_dist
110 ---------------------
112 Used by the `seek_repeated_word' action as the maximum distance two
113 _similar_ words must be separated apart to be considered a repetition
114 (default: 40 words).
116 mp.config.rw_num_chars
117 ----------------------
119 Used by the `seek_repeated_word' action as the number of characters
120 (from the start or the end) two words must match to be considered
121 _similar_ and taken into account for repetitions (default: 4
122 characters).
124 mp.config.status_format
125 -----------------------
127 The status format string to be shown in the status line. By default it's
128 "%m%n %x,%y [%l] %R%O %s %t", where each percent-value means:
130  +----+---------------------------------------------------------+
131  |Tag | Description                                             |
132  +----+---------------------------------------------------------+
133  | %V | Current MP version                                      |
134  +----+---------------------------------------------------------+
135  | %m | Modify flag (asterisk or the empty string)              |
136  +----+---------------------------------------------------------+
137  | %x | X coordinate (column)                                   |
138  +----+---------------------------------------------------------+
139  | %y | Y coordinate (line)                                     |
140  +----+---------------------------------------------------------+
141  | %l | Total number of lines in current document               |
142  +----+---------------------------------------------------------+
143  | %R | Macro recording flag (R or the empty string)            |
144  +----+---------------------------------------------------------+
145  | %O | Overwrite flag (O or the empty string if inserting)     |
146  +----+---------------------------------------------------------+
147  | %s | Syntax highlight in use                                 |
148  +----+---------------------------------------------------------+
149  | %t | Tag target over the cursor, or the empty string if none |
150  +----+---------------------------------------------------------+
151  | %n | Document name                                           |
152  +----+---------------------------------------------------------+
153  | %w | Number of words in the current document (or in the      |
154  |    | current selection, if any). May be slow.                |
155  +----+---------------------------------------------------------+
156  | %% | A percent sign                                          |
157  +----+---------------------------------------------------------+
159 mp.config.tabs_as_spaces
160 ------------------------
162 Set to 1 if tabs must be converted to spaces (default: 0, no conversion).
164 mp.config.tab_size
165 ------------------
167 Tab size in column spaces (default: 8).
169 mp.config.undo_levels
170 ---------------------
172 Maximum number of undo levels per document (default: 100).
174 mp.config.unlink
175 ----------------
177 Set to 1 if the file must be unlinked just before being overwritten
178 (default: 1, do it).
180 mp.config.word_wrap
181 -------------------
183 The column where word wrapping occurs (default: 0, no word wrapping).
186 ----
187 Angel Ortega <angel@triptico.com>