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 lines containing a string..._
74 Cuts to the clipboard all lines from the document or block that
75 match a regular expression.
80 _Cut block_ (`ctrl-x')
82 Copies the currently selected block to the clipboard and deletes the block.
87 _Delete character_ (`delete')
89 Delete the character over the cursor.
94 _Delete character to the left_ (`backspace')
96 Deletes the character to the left of the cursor.
101 _Delete line_ (`ctrl-y')
103 Deletes the line under the cursor.
110 Deletes the currently selected block.
117 Shows a dialog with the list of currently open documents. The list cursor will
118 be over the active one and the documents with pending modifications will be
119 prefixed with an asterisk. Selecting a different one will make it become the
125 _Set charset encoding..._
127 Shows a dialog asking for a string describing the charset encoding that will
128 be used when saving or opening new documents. If an empty string is entered,
129 the current locale will be used.
131 See ./mp_encoding.html (Mininum Profit character encoding support) for
137 _Execute MPSL code..._ (`escape')
139 Shows a dialog asking for a string of MPSL code that will be executed.
144 _Execute document as MPSL_
146 Executes the active document as MPSL code.
151 _Execute action on document..._
153 Shows the full list of available actions in a dialog and ask the user
154 to execute one of it over the current document.
159 _Run system command..._
161 Shows a dialog asking for a system command to execute. If the command is
162 preceded by the pipe symbol (|), the active document will be fed as the
163 standard input of the command; otherwise, the standard output of the command
164 will be inserted in the cursor position.
171 Closes all documents and exists Minimum Profit.
176 _Filter selection through system command..._
178 Filters the block selection (or the full document, if no selection is active)
179 through a system command.
184 _Search tag..._ (`ctrl-t')
186 Shows a dialog asking for a tag to search. The _tags_ file will be read from
187 the working directory and the tag searched there; all symbols starting with it
188 will be shown in a list dialog. When selecting a tag from that list, the file
189 containing it will be open and the cursor moved to where the tag is.
190 This is a useful way of finding where a function or variable is defined.
192 If no _tags_ file exist in the working directory, the *ctags* program is
195 For other uses of the _tags_ file, see `complete_symbol'.
200 _Go to line..._ (`ctrl-g')
202 Shows a dialog asking for a line number. If accepted, the current document
203 cursor will move to that line (if existent).
208 _Grep (find inside) files..._
210 Shows a dialog asking for a string to be searched, and an optional spec of
211 files to search the string in. If no spec is given, all files in the working
212 directory are scanned. Matches are shown in a read-only document, and each
213 match can be directly open by using the 'open_under_cursor' action.
215 This is a useful way to find where a function or variable is used.
220 _Help on word over cursor_ (`f1')
222 Picks the word under the cursor and asks the underlying system for help
228 _Hexadecimal viewer..._
230 Shows a dialog to open a read-only, hexadecimal view of a file.
235 _Ignore last misspelled word_
237 Ignores the last misspelled word found by `seek_misspelled' by adding it
238 to a whitelist so it won't be found again.
243 _Indent block_ (`alt-cursor-right')
245 Indents the block by one tab space, or the current line if the is no
251 _Insert line_ (`enter')
253 Inserts a new line. If the cursor is in the middle of a line,
261 Inserts a new numbered item into the text. Numbered items are as this way:
266 Every time a new item is requested, the current document is scanned for the
267 greatest number and the next one is inserted.
272 _Insert real tab character_ (`shift-tab')
274 Inserts a tab character (\t or ASCII 9) in the cursor position.
275 This is done regardless of the `tabs_as_spaces' configuration
276 variable; see the `insert_tab' action for more configurable tab
282 _Insert space_ (`space')
284 Inserts a space, triggering word wrapping, if active.
291 Inserts a tabulator, triggering word wrapping, if active. The tab
292 will be a real tab or a set of spaces regarding the `tabs_as_spaces'
293 configuration variable. For a hardcoded tab character (\t) see
294 the `insert_real_tab' action.
301 Shows a list dialog with the names of the templates for the user to
302 select one, that will be inserted in the cursor position.
307 _Join a paragraph in one line_
309 Joins the text from the cursor position to the next empty line as one
317 Shows a dialog asking for line configuration options, like word wrapping,
318 end of line string, etc.
325 Loads a session, previously saved by `save_session'.
330 _Mark beginning/end of block_ (`f9')
332 Marks the beginning or the end of the block.
339 Marks (selects) all the document.
344 _Mark vertical block_ (`ctrl-b')
346 Marks the beginning or the end of a vertical (also known as
359 _Mark using mouse dragging_ (`mouse-drag')
361 This action is called by the underlying driver when the mouse is used to drag
362 over text. It must not be called nor bound to a key.
367 _Beginning of document_ (`ctrl-home')
369 Moves the cursor to the beginning of the document (first line, first column).
374 _Beginning of line_ (`home')
376 Moves the cursor to the beginning of the current line (first column).
381 _Line down_ (`cursor-down')
383 Moves the cursor to the next line.
388 _End of document_ (`ctrl-end')
390 Moves the cursor to the last line of the document.
395 _End of line_ (`end')
397 Moves the cursor to the end of the current line.
402 _Character left_ (`cursor-left')
404 Moves the cursor one character to the left. If it's in the beginning of
405 a line, moves to the last character of the previous line.
407 move_mouse_wheel_down
408 ---------------------
410 _Mouse wheel down_ (`mouse-wheel-down')
412 Moves the cursor four lines down.
417 _Mouse wheel up_ (`mouse-wheel-up')
419 Moves the cursor four lines up.
424 _Page down_ (`page-down')
426 Moves the cursor a page down.
431 _Page up_ (`page-up')
433 Moves the cursor a page up.
438 _Character right_ (`cursor-right')
440 Moves the cursor one character to the right. If it's over the end of
441 the line, moves to the first character of the next line.
443 move_to_mouse_position
444 ----------------------
446 _Move cursor to mouse click_ (`mouse_left_button', `mouse_right_button', `mouse-middle-button')
448 Moves the cursor to where the mouse is. This action is called by the
449 underlying system and must not be directly called nor bound to a key.
454 _Line up_ (`cursor-up')
456 Moves the cursor to the previous line.
461 _Word left_ (`ctrl-cursor-left')
463 Moves the cursor to the beginning of the previous word.
468 _Word right_ (`ctrl-cursor-right')
470 Moves the cursor to the beginning of the next word.
477 Creates a new unnamed document.
484 Select the next document as the active one. The list of documents
485 is circular; if the active one is the last, the first one is selected.
492 Shows a dialog to open a file. Its behaviour and look are system-dependent.
494 If the document to be opened is password-protected, a dialog asking for the
495 password will also appear.
500 _Edit configuration file_
502 Opens the user configuration file for editing. It doesn't have to exist.
507 _Open dropped files_ (`dropped-files')
509 Opens all files dropped by the user from an external file manager.
514 _Edit templates file_
516 Opens the templates file for edition. Templates defined here can be later
517 inserted by calling `insert_template'. See the `mp_templates.sample' file
518 included in the documentation for an example of the accepted format.
523 _Open file under cursor_ (`ctrl-enter')
525 Picks the word in the current document under the cursor, accepts it as
526 a document name and tries to open it. If it's in the format string:number,
527 is accepted as a file name and a line number.
532 _Paste block_ (`ctrl-v')
534 Pastes the text in the clipboard into the cursor position.
541 Replays all keystrokes recorded during the previous _learning mode_,
542 activated by a call to `record_macro'.
549 Select the previous document as the active one. The list of documents
550 is circular; if the active one is the first, the last one is selected.
555 _Record macro_ (`f10')
557 Toggles _learning mode_. When active, all keystrokes are recorded to
558 further execute them by a call to `play_macro'.
565 Redoes the previously undone operation, if any.
567 repeated_words_options
568 ----------------------
570 _Repeated words options..._
572 Sets the options for the `seek_repeated_word' action.
577 _Replace..._ (`ctrl-r')
579 Shows the search and replace dialog box.
586 Reverts the active document to the state on disk.
593 Saves the active document. If it's unnamed, `save_as' is called instead.
600 Shows a dialog asking for a file name to save the current document as.
601 Its behaviour and look are system-dependent.
608 Saves all documents and its positions as a session to be later loaded
614 _Section list..._ (`ctrl-d')
616 Shows a list with the sections found in the current document. Selecting
617 one of them moves the cursor there.
622 _Search text..._ (`ctrl-f')
624 Shows the search text dialog.
629 _Search misspelled word_ (`f5')
631 Searches for the next misspelled word in the current document. If one
632 is found, the cursor is moved there. If it's a false positive, the
633 `ignore_last_misspell' action can be called to add the recently found
634 word to a whitelist so it won't be found again.
641 Searches the next occurrence of the string entered by the `seek' action.
646 _Move to next instance of current char_ (`ctrl-page-down')
648 Searches for the next occurrence of the char under the cursor. This is
649 useful, for instance, to jump to the next paren or brace.
654 _Search previous_ (`ctrl-f3')
656 Same as `seek_next', but searching backwards.
661 _Move to previous instance of current char_ (`ctrl-page-up')
663 Searches for the previous occurrence of the char under the cursor. This is
664 useful, for instance, to jump to the previous paren or brace.
669 _Search repeated word_ (`f6')
671 Searches for repeated words. Controlled by the configuration directives
672 `mp.config.rw_num_chars' and `mp.config.rw_max_dist'. A searching is done
673 from the cursor position trying to find two words nearer from each
674 other up to a maximum of the specified distance and that start or
675 end with the same letters. If a pair is found, the words are
676 highlighted as spelling errors and the cursor moved over the first
677 one. Otherwise, a message marking the end is shown and nothing is done.
682 _Password protect..._
684 Shows a dialog asking (twice) for a password to protect the active document with
685 when it's saved. From that moment on, each time the document is tried to open
686 the password will be asked for.
688 Minimum Profit encrypts documents using a variant of the ARCFOUR algorithm.
693 _Save modified texts_
695 Saves all texts with pending modifications.
702 Shows a dialog asking for tabulator configuration options, like tab size,
703 convert to spaces, etc.
708 _Toggle insert/overwrite mode_ (`insert')
710 Toggles between insert and overwrite modes.
715 _Toggle spellchecking_
717 toggles spellchecking. When active, misspelled words will be shown underlined.
724 Undoes the last operation.
729 _Unindent block_ (`alt-cursor-left')
731 Unindents the block by one tab space, or the current line if the is no
737 _Unmark block_ (`f8')
739 Unmarks the selected block.
746 Counts the number of words and lines in the active document.
751 _Word-wrap a paragraph_ (`f4')
753 Rebuilds the text from the cursor position to the following empty
754 line using the wordwrapping setup. Wordwrapping must be set (see
760 _Bigger font_ (`f12')
762 Selects a bigger font (only for GUIs).
767 _Smaller font_ (`f11')
769 Selects a smaller font (only for GUIs).
773 Angel Ortega <angel@triptico.com>