1 Minimum Profit Action Reference
2 ===============================
4 Minimum Profit _actions_ are editor commands that can be directly
5 bound to the menu or a key.
12 Shows the "About Minimum Profit" information.
17 _Build project..._ (`f2')
19 Invokes the building of a Make project. If the `Makefile' file exists in the
20 working directory, all targets are extracted from it and shown in a list dialog
21 for the user to select one. The selected one will be called as the only argument
22 for the `make' program and its output read. All output will be catched and shown
23 in a read-only document. Compiler errors and warnings will be highlighted and
24 can be navigated by using the `seek_next' and `seek_prev' actions (keys `f3' and
25 `ctrl-f3'). The `open_under_cursor' action can be used to edit each error or warning.
32 Closes the active document. If there are unsaved changes, a confirmation dialog
40 Closes all open documents.
45 _Complete..._ (`ctrl-u')
47 Takes the (probably partial) word under the cursor and searches for words in
48 the current document that start with it. If more than one is found, a list dialog
49 is shown to make a selection. The word will be replaced with the selected one.
54 _Symbol completion..._
56 Uses a similar approach than the `complete' action, but using the current _tags_
57 file as the completion list. If no _tags_ file exist in the working directory,
58 the *ctags* program is invoked to build it.
60 For other uses of the _tags_ file, see `find_tag'.
65 _Copy block_ (`ctrl-c')
67 Copies the currently selected block to the clipboard.
72 _Cut block_ (`ctrl-x')
74 Copies the currently selected block to the clipboard and deletes the block.
79 _Delete character_ (`delete')
81 Delete the character over the cursor.
86 _Delete character to the left_ (`backspace')
88 Deletes the character to the left of the cursor.
93 _Delete line_ (`ctrl-y')
95 Deletes the line under the cursor.
102 Shows a dialog with the list of currently open documents. The list cursor will
103 be over the active one and the documents with pending modifications will be
104 prefixed with an asterisk. Selecting a different one will make it become the
110 _Set charset encoding..._
112 Shows a dialog asking for a string describing the charset encoding that will
113 be used when saving or opening new documents. If an empty string is entered,
114 the current locale will be used. the following set of character encodings are
118 Aliases are utf-8, UTF8 and UTF-8.
120 Aliases are iso-8859-1, ISO-8859-1, ISO8859-1, latin1, latin-1, LATIN1 and LATIN-1.
121 * utf16 (with endianness detection on input and local endianness on output).
122 Aliases are utf-16, UTF16, UTF-16, ucs-2, UCS2, UCS-2.
123 * utf16be (big endian).
124 Aliases are utf-16be, UTF16BE, UTF-16BE, ucs2be, UCS2BE, ucs-2be and UCS-2BE.
125 * utf16le (little endian).
126 Aliases are utf-16le, UTF16LE, UTF-16LE, ucs2le, UCS2LE, ucs-2le and UCS-2LE.
127 * utf32 (with endianness detection on input and local endianness on output).
128 Aliases are utf-32, UTF32, UTF-32, ucs-4, ucs4, UCS-4 and UCS4.
129 * utf32be (big endian).
130 Aliases are utf-32be, UTF32BE, UTF-32BE, ucs4be, UCS4BE, ucs-4be and UCS-4BE.
131 * utf32le (little endian).
132 Aliases are utf-42le, UTF42LE, UTF-42LE, ucs4le, UCS4LE, ucs-4le and UCS-4LE.
134 If the 'iconv' library is available, there can be many more encodings.
139 _Execute MPSL code..._ (`escape')
141 Shows a dialog asking for a string of MPSL code that will be executed.
146 _Execute document as MPSL_
148 Executes the active document as MPSL code.
153 _Run system command..._
155 Shows a dialog asking for a system command to execute. If the command is
156 preceded by the pipe symbol (|), the active document will be fed as the
157 standard input of the command; otherwise, the standard output of the command
158 will be inserted in the cursor position.
165 Closes all documents and exists Minimum Profit.
170 _Search tag..._ (`ctrl-t')
172 Shows a dialog asking for a tag to search. The _tags_ file will be read from
173 the working directory and the tag searched there; all symbols starting with it
174 will be shown in a list dialog. When selecting a tag from that list, the file
175 containing it will be open and the cursor moved to where the tag is.
176 This is a useful way of finding where a function or variable is defined.
178 If no _tags_ file exist in the working directory, the *ctags* program is
181 For other uses of the _tags_ file, see `complete_symbol'.
186 _Go to line..._ (`ctrl-g')
188 Shows a dialog asking for a line number. If accepted, the current document
189 cursor will move to that line (if existent).
194 _Grep (find inside) files..._
196 Shows a dialog asking for a string to be searched, and an optional spec of
197 files to search the string in. If no spec is given, all files in the working
198 directory are scanned. Matches are shown in a read-only document, and each
199 match can be directly open by using the 'open_under_cursor' action.
201 This is a useful way to find where a function or variable is used.
206 _Help on word over cursor_ (`f1')
208 Picks the word under the cursor and asks the underlying system for help
214 _Ignore last misspelled word_
216 Ignores the last misspelled word found by `seek_misspelled' by adding it
217 to a whitelist so it won't be found again.
222 _Insert line_ (`enter')
224 Inserts a new line. If the cursor is in the middle of a line,
230 _Insert space_ (`space')
232 Inserts a space, triggering word wrapping, if active.
239 Inserts a tabulator, triggering word wrapping, if active.
246 Shows a list dialog with the names of the templates for the user to
247 select one, that will be inserted in the cursor position.
252 _Join a paragraph in one line_ (`f6')
254 Joins the text from the cursor position to the next empty line as one
262 Shows a dialog asking for line configuration options, like word wrapping,
263 end of line string, etc.
270 Loads a session, previously saved by `save_session'.
275 _Mark beginning/end of block_ (`f9')
277 Marks the beginning or the end of the block.
282 _Mark vertical block_ (`ctrl-b')
284 Marks the beginning or the end of a vertical (also known as
297 _Mark using mouse dragging_ (`mouse-drag')
299 This action is called by the underlying driver when the mouse is used to drag
300 over text. It must not be called nor bound to a key.
305 _Beginning of document_ (`ctrl-home')
307 Moves the cursor to the beginning of the document (first line, first column).
312 _Beginning of line_ (`home')
314 Moves the cursor to the beginning of the current line (first column).
319 _Line down_ (`cursor-down')
321 Moves the cursor to the next line.
326 _End of document_ (`ctrl-end')
328 Moves the cursor to the last line of the document.
333 _End of line_ (`end')
335 Moves the cursor to the end of the current line.
340 _Character left_ (`cursor-left')
342 Moves the cursor one character to the left. If it's in the beginning of
343 a line, moves to the last character of the previous line.
345 move_mouse_wheel_down
346 ---------------------
348 _Mouse wheel down_ (`mouse-wheel-down')
350 Moves the cursor four lines down.
355 _Mouse wheel up_ (`mouse-wheel-up')
357 Moves the cursor four lines up.
362 _Page down_ (`page-down')
364 Moves the cursor a page down.
369 _Page up_ (`page-up')
371 Moves the cursor a page up.
376 _Character right_ (`cursor-right')
378 Moves the cursor one character to the right. If it's over the end of
379 the line, moves to the first character of the next line.
381 move_to_mouse_position
382 ----------------------
384 _Move cursor to mouse click_ (`mouse_left_button', `mouse_right_button', `mouse-middle-button')
386 Moves the cursor to where the mouse is. This action is called by the
387 underlying system and must not be directly called nor bound to a key.
392 _Line up_ (`cursor-up')
394 Moves the cursor to the previous line.
399 _Word left_ (`ctrl-cursor-left')
401 Moves the cursor to the beginning of the previous word.
406 _Word right_ (`ctrl-cursor-right')
408 Moves the cursor to the beginning of the next word.
415 Creates a new unnamed document.
422 Select the next document as the active one. The list of documents
423 is circular; if the active one is the last, the first one is selected.
430 Shows a dialog to open a file. Its behaviour and look are system-dependent.
432 If the document to be opened is password-protected, a dialog asking for the
433 password will also appear.
438 _Edit configuration file_
440 Opens the user configuration file for editing. It doesn't have to exist.
445 _Edit templates file_
447 Opens the templates file for edition. Templates defined here can be later
448 inserted by calling `insert_template'. See the `mp_templates.sample' file
449 included in the documentation for an example of the accepted format.
454 _Open file under cursor_ (`ctrl-enter')
456 Picks the word in the current document under the cursor, accepts it as
457 a document name and tries to open it. If it's in the format string:number,
458 is accepted as a file name and a line number.
463 _Paste block_ (`ctrl-v')
465 Pastes the text in the clipboard into the cursor position.
472 Replays all keystrokes recorded during the previous _learning mode_,
473 activated by a call to `record_macro'.
480 Select the previous document as the active one. The list of documents
481 is circular; if the active one is the first, the last one is selected.
486 _Record macro_ (`f10')
488 Toggles _learning mode_. When active, all keystrokes are recorded to
489 further execute them by a call to `play_macro'.
496 Redoes the previously undone operation, if any.
501 _Replace..._ (`ctrl-r')
503 Shows the search and replace dialog box.
510 Reverts the active document to the state on disk.
517 Saves the active document. If it's unnamed, `save_as' is called instead.
524 Shows a dialog asking for a file name to save the current document as.
525 Its behaviour and look are system-dependent.
532 Saves all documents and its positions as a session to be later loaded
538 _Section list..._ (`ctrl-d')
540 Shows a list with the sections found in the current document. Selecting
541 one of them moves the cursor there.
546 _Search text..._ (`ctrl-f')
548 Shows the search text dialog.
553 _Search misspelled word_ (`ctrl-f7')
555 Searches for the next misspelled word in the current document. If one
556 is found, the cursor is moved there. If it's a false positive, the
557 `ignore_last_misspell' action can be called to add the recently found
558 word to a whitelist so it won't be found again.
565 Searches the next occurrence of the string entered by the `seek' action.
570 _Move to next instance of current char_ (`ctrl-page-down')
572 Searches for the next occurrence of the char under the cursor. This is
573 useful, for instance, to jump to the next paren or brace.
578 _Search previous_ (`ctrl-f3')
580 Same as `seek_next', but searching backwards.
585 _Move to previous instance of current char_ (`ctrl-page-up')
587 Searches for the previous occurrence of the char under the cursor. This is
588 useful, for instance, to jump to the previous paren or brace.
593 _Password protect..._
595 Shows a dialog asking (twice) for a password to protect the active document with
596 when it's saved. From that moment on, each time the document is tried to open
597 the password will be asked for.
599 Minimum Profit encrypts documents using a variant of the ARCFOUR algorithm.
604 _Save modified texts_
606 Saves all texts with pending modifications.
613 Shows a dialog asking for tabulator configuration options, like tab size,
614 convert to spaces, etc.
619 _Toggle spellchecking_
621 toggles spellchecking. When active, misspelled words will be shown underlined.
628 Undoes the last operation.
633 _Unmark block_ (`f8')
635 Unmarks the selected block.
642 Counts the number of words and lines in the active document.
647 _Word-wrap a paragraph_ (`f4')
649 Rebuilds the text from the cursor position to the following empty
650 line using the wordwrapping setup. Wordwrapping must be set (see
656 _Bigger font_ (`f12')
658 Selects a bigger font (only for GUIs).
663 _Smaller font_ (`f11')
665 Selects a smaller font (only for GUIs).
669 Angel Ortega <angel@triptico.com>