

You may get an error for omitting that.ġ. Also, it would be beneficial to change the mapping to use $VIM instead of C:\Program Files\vimĪnother thing is that there should be a tab before the line in the for-loop. Just to ensure it doesn't cause problems for those of use who use the same Vim setup on Windows & Linux. Just a thought on this one, perhaps it would be better to enclose run.vim in: However, when I enter a matlab script I get this:Ĭouldn't open buffer 3 in window 2, creating a new windowĮrror message: NameError: name 'Dispatch' is not defined

I created the files run.vim, run.py, and the map. See the improved version of this tip in script#1634. I'm using WinXP, Vim 7.0, Matlab 6.5, and Python 2.4. Then just type ,r you can run and get the results in the current windows. Map ,r :w:cd C:/Program Files/Vim/vimfiles/ftplugin/matlab:pyf run.py If you have a Matlab script file (not function file), then you could add the following simple files to C:/Program Files/Vim/vimfiles/ftplugin/matlab (depends on where you installed Vim). Tip 1298 Printable Monobook Previous Next
