======mp-5====== **mp-5** ("Minimun Profit Text Editor") is a multi-language [[text editors on sdf|text editor]] for programmers. It's developed by Angel Ortega. It features multiple levels of undo, advanced selection capabilities, multiple document editing at once, and has syntax highlighting for many popular programming languages, such as C, C++, Perl, Ruby, HTML, Python, PHP, shell scripts, etc. ===Run=== You can run it with: mp-5 file.txt ====Using mp-5==== You can type your text directly into a buffer. Operate the text editor using the [[#mp-5 commands|mp-5 commands]]. If you have configured mp-5 with its ''~/.config/mp/mp.mpsl'' file, you will have a spell checker. Press the **F5 key** to look up the next word that does not appear in the dictionary, or turn on the display of misspelled words from the Writing Menu / Toggle Spelling. Save your changes with **Ctrl+s**. Exit the editor with **Ctrl+q**. ===Selection Modes=== mp-5 has three different Selection Modes: "Block", "Corner" and "Move". These allows to select a region of text and operate it according to the [[#edits|editing commands]]. The //Find//, //Replace//, etc. operations will be applied only to the selected text region (if you choose one). It will be possible to extend the selected text region as much as you want. You can deselect the text region by pressing **F8**, or when you copy, delete, or replace the block. ==Block Selection Mode== To select a region of text in a block, move to the start position of the text and mark it with F9; then move to the end position of the text and mark it by pressing F9 again. The text block will be highlighted, and will act as a selected text region. Vertex Selection Mode To select a vertical region of text, move to the start vertex and press **Ctrl+b**; then move to the end vertex position and mark it by pressing **Ctrl+b** again. A vertical rectangle of text will be highlighted between the two vertices, and will act as a //selected text region//. ==Selection Moving Mode== This mode does not work on remote terminals, but it will work in a local viewport. To select a region of text in the conventional way, hold down the **Shift key** and use mp-5's [[#movement|movement shortcuts]]. ===mp-5 as an IDE=== mp-5 adds some interesting features useful for writing programming code, allowing it to be integrated as a simple integrated development environment (IDE). If you are working with git, you can request version control using **Ctrl+p**, or search for programming tags with **Ctrl+t**. You can invokes the compilation of a project, with the Build function (**F2 key**). If a ''makefile'' exists in the current working directory, all object files will be extracted and a list will be displayed. Choose the desired one and a //make// will be performed, the result of which will be displayed on the screen as a read-only document (for analysis). If compilation errors or warnings appear, you can navigate between them by moving forward with **F3** and backward with **Ctrl+F3**. ====MP-5 Commands==== ===General Commands=== ^Shortcut^ Command^ |Ctrl+a |Opens the menu bar (terminal version). | |Alt+a |Opens the menu bar | |Ctrl+o |Open file | |Ctrl+s |Save changes to document | |Ctrl+e |List open documents | |Ins |Switches between insert mode or overwrite mode. | |Ctrl+f |Find next string | |Ctrl+r |Find and replace string | |Ctrl+t |Find tag | |Ctrl+w |Close window | |Ctrl+l |Send mp-5 to background (return with fg command) | |Ctrl+q |**Quit mp-5** | ===Movement=== ^Shortcut ^Movement of cursor ^ |Ctrl+Right Arrow |Move to next word. | |Ctrl+Left Arrow |Move to previous word. | |Home |Move to beginning of line | |End |Move to end of line | |Alt+Up Arrow / Page Up |Move to previous screen | |Alt+Down Arrow / Page Down |Move to next screen | |Ctrl+Home |Move to beginning of file. | |Ctrl+End |Move to end of file. | |Ctrl+g |Go to line number | |Ctrl+d |List sections. | |Ctrl+Up Arrow |Move to section above. | |Ctrl+Down Arrow |Move to section below. | ===Select=== ^Shortcut ^Selection command ^ |F9 |Mark Start/End of selection | |F8 |Deselect block | |Ctrl+b |Mark start/end of vertical block | ===Edit=== ^Shortcut ^ Edition Command^ |Ctrl+x |Cut selected block | |Ctrl+c |Copy selected block | |Ctrl+v |Paste selected block | |Ctrl+z |Undo (multiple levels) | |Ctrl+k |Justify paragraph to screen (soft-wrap). | |Alt+Left Arrow |indents text block. | |Alt+Right Arrow |unindents text block. | |Backspace/Delete |Delete selected block | |Ctrl+Backspace |Delete previous word | |Ctrl+y |Delete line. | ^Shortcuts^ Command Function^ |F1 |Help | |F2 |Build. | |F3 |Find next. | |F4 |Justify paragraph. | |F5 |Find misspelled word. | |F6 |Search for repeated word. | |F7 |Executes Macro. | |F10 |Records Macro. | |F11/F12 |decrease or increase the font size (only on graphic terminals). |