All functions with a doc as first argument returns it in mp_file.mpsl (except for...
[mp-5.x.git] / doc / mp_configuration.txt
blobd1253447cbf90dccdf42c293095239fd99290cfe
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 sequence. By default is "\n" on Unix/Linux
43 systems or "\r\n" on MSDOS / Windows.
45 mp.config.font_face
46 -------------------
48 The font face to be used in GUI environments. By default it's "Mono" on
49 KDE4 and GTK and "Lucida Console" on MS Windows.
51 mp.config.font_size
52 -------------------
54 The font size to be used in GUI environments. By defaults it's 12 on KDE
55 and GTK and 14 on MS Windows.
57 mp.config.global_replace
58 ------------------------
60 Set to 1 if the _replace_ operation must be done to the end of the file
61 (default: 0, do it only once).
63 mp.config.ispell_cmd
64 --------------------
66 The external command to be executed as a pipe for spellchecking. It must be
67 compatible with `ispell', and by default it's "ispell -a". Other useful
68 values are "aspell -a", if you have `aspell' installed (a better
69 alternative), or "ispell -a -Tutf8", if you happen to be in an UTF-8
70 environment and must use `ispell'.
72 mp.config.keep_eol
73 ------------------
75 If this option is set, each document will keep its original end of line
76 sequence when saved. If not set, the string set in `mp.config.eol' will be
77 used regardless of the original one (default: 1).
79 mp.config.local_sessions
80 ------------------------
82 Set to 1 to store session information in the currently working directory
83 instead of in the home directory (default: 0, save sessions in the
84 home directory).
86 mp.config.mark_eol
87 ------------------
89 If set to 1, end-of-line characters are marked with a special character,
90 instead of being invisible (default: 0, don't mark).
92 mp.config.maximize
93 ------------------
95 Set to 1 if the GUI window must open maximized (default: 0, no maximize).
97 mp.config.move_seek_to_line
98 ---------------------------
100 The line number to be set the cursor to when a successful search is hit
101 (default: 5). If set to 0, the position is not touched.
103 mp.config.preread_lines
104 -----------------------
106 The number of lines to read above the first visible line to calculate
107 syntax highlight in blocks (default: 60 lines). There is probably no
108 need to change this, unless using very big comment blocks or the like.
110 mp.config.recursive_grep
111 ------------------------
113 If set, the `grep' action is done recursively (default: 0).
115 mp.config.rw_max_dist
116 ---------------------
118 Used by the `seek_repeated_word' action as the maximum distance two
119 _similar_ words must be separated apart to be considered a repetition
120 (default: 40 words).
122 mp.config.rw_num_chars
123 ----------------------
125 Used by the `seek_repeated_word' action as the number of characters
126 (from the start or the end) two words must match to be considered
127 _similar_ and taken into account for repetitions (default: 4
128 characters).
130 mp.config.status_format
131 -----------------------
133 The status format string to be shown in the status line. By default it's
134 "%m%n %x,%y [%l] %R%O %s %e %t", where each percent-value means:
136  +----+---------------------------------------------------------+
137  |Tag | Description                                             |
138  +----+---------------------------------------------------------+
139  | %V | Current MP version                                      |
140  +----+---------------------------------------------------------+
141  | %m | Modify flag (asterisk or the empty string)              |
142  +----+---------------------------------------------------------+
143  | %x | X coordinate (column)                                   |
144  +----+---------------------------------------------------------+
145  | %y | Y coordinate (line)                                     |
146  +----+---------------------------------------------------------+
147  | %l | Total number of lines in current document               |
148  +----+---------------------------------------------------------+
149  | %R | Macro recording flag (R or the empty string)            |
150  +----+---------------------------------------------------------+
151  | %O | Overwrite flag (O or the empty string if inserting)     |
152  +----+---------------------------------------------------------+
153  | %s | Syntax highlight in use                                 |
154  +----+---------------------------------------------------------+
155  | %t | Tag target over the cursor, or the empty string if none |
156  +----+---------------------------------------------------------+
157  | %n | Document name                                           |
158  +----+---------------------------------------------------------+
159  | %e | Encoding used in the file, or the empty string if using |
160  |    | current locale                                          |
161  +----+---------------------------------------------------------+
162  | %w | Number of words in the current document (or in the      |
163  |    | current selection, if any). May be slow.                |
164  +----+---------------------------------------------------------+
165  | %% | A percent sign                                          |
166  +----+---------------------------------------------------------+
168 mp.config.tabs_as_spaces
169 ------------------------
171 Set to 1 if tabs must be converted to spaces (default: 0, no conversion).
173 mp.config.tab_size
174 ------------------
176 Tab size in column spaces (default: 8).
178 mp.config.undo_levels
179 ---------------------
181 Maximum number of undo levels per document (default: 100).
183 mp.config.unlink
184 ----------------
186 Set to 1 if the file must be unlinked just before being overwritten
187 (default: 1, do it).
189 mp.config.word_wrap
190 -------------------
192 The column where word wrapping occurs (default: 0, no word wrapping).
195 ----
196 Angel Ortega <angel@triptico.com>