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 ea0e9ea5be943322fa91e83d515228704abf23e3
parent ce1dbc50119f0d227a12181dbfad59dabb6dc38a
Author: mcol <mcol@posteo.net>
Date:   Mon, 26 Nov 2018 17:01:43 +0000

updated slime sending lines

Diffstat:
Mftplugin/matlab/slime.vim | 16+++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/ftplugin/matlab/slime.vim b/ftplugin/matlab/slime.vim @@ -47,9 +47,9 @@ if !exists("g:no_vimlab_autoend") call feedkeys('A') endfunction - inoremap <buffer> <silent> if<space> if<space><Esc>:call Matlab_auto_end()<CR> - inoremap <buffer> <silent> for<space> for<space><Esc>:call Matlab_auto_end()<CR> - inoremap <buffer> <silent> switch<space> switch<space><Esc>:call Matlab_auto_end()<CR> + inoremap <buffer> <silent> if<space> if<space><Esc><Plug>MatlabAutoEnd + inoremap <buffer> <silent> for<space> for<space><Esc><Plug> MatlabAutoEnd + inoremap <buffer> <silent> switch<space> switch<space><Esc><Plug> MatlabAutoEnd endif @@ -63,7 +63,8 @@ if exists("g:vimlab_session") " This could be mapped separately to save the session without exiting function! VimlabSaveSession() wall - mksession! g:vimlab_session + exec "mksession!" . g:vimlab_session + echo "Session saved" endfunction function! VimlabEndSession() @@ -72,7 +73,8 @@ if exists("g:vimlab_session") endfunction if !hasmapto('<Plug>VimlabEndSession') - nnoremap <buffer> XA <Plug>VimlabEndSession + "nnoremap <buffer> XA <Plug>VimlabEndSession + nnoremap <buffer> XA :call VimlabEndSession()<CR> endif endif @@ -132,10 +134,10 @@ xnoremap <buffer> <silent> <F9> <Plug>SlimeRegionSend nnoremap <buffer> <silent> <F9> <Plug>SlimeParagraphSend " F8 will run current line -nnoremap <buffer> <silent> <F8> :SlimeSend1 getline('.')<CR> +nnoremap <buffer> <silent> <F8> :SlimeSend0(getline('.'))<CR> " F7 will run the current word -nnoremap <buffer> <silent> <F7> :call SlimeSend1 expand('<cword>')<CR> +nnoremap <buffer> <silent> <F7> :SlimeSend0(expand('<cword>'))<CR> " F4 will run the current section function! VimlabRunSection()