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