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.
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.
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:
E492: Not an editor command: ^M
E15: Invalid expression: exists("b:did_ftplugin")^M
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.
I am having the same problem as many others it seems, as I am getting an error when the ftplugin file is called. How do I fix this? Where do I add the contents into matchit.vim file as leptogenesis did to make the code work?
Nice job on these plugins! However, I had the same problem as john--I had to add the contents of ftplugin/matlab.vim to matchit.vim to make the ftplugin work on one of my systems (linux).
More importantly, though, the mlint integration seems almost useless because you have to scroll through every stupid warning mlint spits out to find the true errors. Is there a way to make it only report things that would actually prevent the program from running? (e.g. missing 'end' statements, unmatched parens, etc)