Memming's Inconsistency
Nothing Personal, Yet Subjective
Blog | Guestbook
Keyword | Local | Tag
T 27 / Y 78 / Total 54293
Catergories
Calendar
«   2010/07   »
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Tag
tip, MATLAB, vim, LaTeX, mathematics, Google, Tips, 촛불집회, derivative, conference wsom, theorem, CNEL, correlogram, ocw, equation search engine, algorithm, synchrony, spike train, coupled oscillator, javascript,
Archive
Link
Search
  submit
Recent Articles
Recent Comments
Recent Trackbacks
2007/01/27 15:42
block commenting in MATLAB and syntax highlighting in vim
2007/01/27 15:42 2007/01/27 15:42
Not many people know there's a block comment functionality in MATLAB.

%{
These are all commented.
function call, for loop, everything.
%}

The default syntax file of vim 7 does not highlight these.
Add the following lines to $VIM/syntax/matlab.vim

syn region matlabBlockComment        start=+%{+    end=+%}+
HiLink matlabBlockComment        Comment

The syn region line has to come after the "syn match matlabComment" line.
TAG : , ,
Trackback : http://blog.memming.com/trackback/2300799
Stephen (2010/01/31 14:02)
Actually, you can put this in $VIMRUNTIME/after/syntax/matlab.vim (especially for those of us who don't have access to $VIM). The special "after" directory means it will be loaded after $VIM/syntax/matlab.vim. The only modification is that you must redefine the HiLink command (just copy from the existing matlab.vim file).

Name   Password   Home   Secret   Submit
 Prev   1  ...  17   18   19   20   21   22   23   24   25  ...  29   Next 
memming’s Blog is powered by Tattertools.com / Designed by faido