A vim plugin that emulates all of the powerful IDE features of MATLAB in vim so you don't need to run the full GUI.
git clone https://mcol.xyz/code/vimlab
Log | Files | Refs | README | LICENSE

commit 8a394ae8ab8105bdaf5abd8dcb996b46458bd780
parent f0adbd6034aba0b9a25bc37e96ad91b142e5a97d
Author: mcol <mcol@posteo.net>
Date:   Sun, 16 Dec 2018 00:36:16 +0000

update readme to remove slime and add a couple more bindings

Diffstat:
MREADME.md | 37+++++++++++++++----------------------
1 file changed, 15 insertions(+), 22 deletions(-)

diff --git a/README.md b/README.md @@ -8,11 +8,10 @@ It is my attempt at making vim and matlab work together as painlessly as possibl * [Fabrice Guy's](https://www.vim.org/scripts/script.php?script_id=2407) syntax highlighting, matchit pairing of for/end, if/end etc, and indentation rules. * Hitting enter in vim on a word to open it in the variable editor or in vim, if it is a variable or m file. -* Better section folding and layout memory -* Lots of matlab's own keybindings for running code lines, sections, selection, script +* Matlab's own keybindings for running code lines, sections, selection, script etc, using [tide](https://github.com/mcolligan/tide.git) * Debugging keybindings, including setting and clearing markers and navigating the function stack -* Automatic session saving -* Automatic code checking and error highlighting with [Thomas Ibbotson's mlint.vim](https://www.vim.org/scripts/script.php?script_id=2378) +* Automatic session saving like in matlab +* Automatic/on demand code checking and error highlighting with [Thomas Ibbotson's mlint.vim](https://www.vim.org/scripts/script.php?script_id=2378) * A shell script to find .m files in specified local directories and add them to the list of functions for syntax highlighting ## Usage @@ -23,6 +22,7 @@ Most of the cool stuff requires vim be run in server mode. To run a vim server t vim --servername vimlab + ### Session restoration To enable session saving and restoration, add this to your .vimrc: @@ -38,10 +38,6 @@ You can change the default binding to save and exit (which is XA in normal mode) nnoremap XA <Plug>VimlabEndSession -### vim-slime - -To send commands to matlab, you'll need [vim-slime](https://github.com/jpalardy/vim-slime) set up. Not everything here requires it, so those that do will have * in the subtitle. - ### Opening variables, functions or scripts from vim* Hitting enter when the cursor is on a word will either: @@ -56,25 +52,15 @@ The default bindings are <CR> to open the word in the vim server and <Leader><CR let G:vimlab_terminal = "xterm" -### Running code* - -| Key | Function | -|----------------|-------------------------------| -| F9 | run the current paragraph/visual selection (same as <C-c><C-c> from vim-slime).| -| F8 | run the current line.| -| F7 | run the current word.| -| F4 |run the current section (bound by %%).| -| F2 | run the name of the current file as a script (so must be on matlabs path).| -| \<C-w\> | run _who_, listing variables in the current workspace.| - ### Debugging* | Key | Function | |----------------|-------------------------------| | \a | **a**dd a debug marker at the current line (this saves the buffer) | -| \c | **c**lear the marker at the current line | +| \r | **r**emove the marker at the current line | +| \t | **t**oggle the marker at the current line | | \s or F10 | **s**tep to the next line in debug mode | -| \g or F5 | **g**o on with running the code | +| \c or F5 | **c**ontinue running the code | | \e | toggle stopping to debug at **e**rrors | | \x | e**x**it debug mode | | \f | **f**lush all markers | @@ -84,6 +70,7 @@ The default bindings are <CR> to open the word in the vim server and <Leader><CR These keybindings assume the leader key is the default backslash. + ### Code checking This plugin contains Thomas Ibbotson's [mlint.vim](https://www.vim.org/scripts/script.php?script_id=2378). If mlint isn't on your system's \$PATH, you can set the path by putting this in your .vimrc: @@ -94,17 +81,23 @@ This will automatically run mlint when the cursor is idle, but this can be disab let g:mlint_hover = 1 +Auto linting can be toggled with the ToggleLine command, which is bound by default to <leader><br> + | Key | Function | |------|---------| | \ll | run mlint manually | +| \| | toggle automatic mlint aucommands | | \lm | see the message from the current line | | \lo | view an outline of all messages | | \ln | jump to the next message | | \lp | jump to the previous message | + ### Auto close of for, if, switch statements -For, if, and switch statements will automatically get an end placed below them on the next empty line. So if there is a code block on the next line, the statement will surround it. To disable this altogether, set the variable *g:vimlab_no_autoend* +For, if, and switch statements will automatically get an end placed below them on the next empty line. +So if there is a code block on the next line, the statement will surround it. To disable this altogether, set the variable *g:vimlab_no_autoend* + ### Misc