Rank: 170573 based on 0 downloads (last 30 days) and 0 file submitted
photo

Ben

E-mail

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by Ben View all
Updated File Comments Rating
11 Aug 2011 Editing Matlab files in Vim Edit Matlab M-files in Vim editor (indentation, syntax highlighting, tags , mlint support) Author: Fabrice

Thanks for the reply Robert. I had tried that before with no success. What ended up fixing it was running dos2unix (fromdos in Ubuntu) on the file. :%s/^M/\r/g has always worked for me in the past, so that was why I was confused by this. Thanks for your help.

Ben

05 Jul 2011 Editing Matlab files in Vim Edit Matlab M-files in Vim editor (indentation, syntax highlighting, tags , mlint support) Author: Fabrice

Well, I spoke too soon with issue number 2. To limit spellchecking to comments, open syntax/matlab.vim and add ",@Spell" at the ends of lines 57 and 58. To include strings, add "contains=@Spell" to the end of line 36.

This is the same method used in the built in c.vim file. cpp.vim doesn't have this though, so I'm not sure why it does this except that it probably loads the c.vim first.

Anyway, this might be something good to add to future versions. If anyone has a solution to the ftplugin/matlab.vim error I'm getting, I would love to hear it.

05 Jul 2011 Editing Matlab files in Vim Edit Matlab M-files in Vim editor (indentation, syntax highlighting, tags , mlint support) Author: Fabrice

This set of files is great. Matlab files in Vim used to be a huge pain. I am having a couple small issues, though.
First, when I open a .m file, I get this error:
Error detected while processing /home/bbergman/.vim/ftplugin/matlab.vim:
line 5:
E492: Not an editor command: ^M
line 6:
E15: Invalid expression: exists("b:did_ftplugin")^M
line 35:
E171: Missing :endif

Opening the ftplugin file, I see no ^M characters and all endifs seem to be fine. I have not worked with ftplugin files before, so I have no idea what the issue is with the exists line.

My second issue is that spelling and grammar checking flags all sorts of stuff in the code. In contrast, when I open a c file, only text in comments and string literals get checked. I forget if this is something I had to explicitly do for c/c++, but it would be nice to have in here as well.

Third, matching if/endif with % seems to work great, but % will not cycle through elseifs as it does in some other languages. This might be something to add in future versions.

Again, this set of plugins is great and I only wish I had found them a long time ago. Keep up the good work.

Contact us