I have a file with some subroutines.
The syntax is like
subroutine sub_name_1
...
endsub
/* or optionally */
subroutine sub_name_2 {
...
}
There are called like call sub_name_1
.
I can't give arguments there, there is nothing of "(", ")", ";" behind.
Maybe some space characters.
I'm looking for a possibility to "collect" all the name behind the subroutine
keywords an highlight them not only after the subroutine
keyword but also after the call
keywords if exist.
It would be best if I could color them in another way if the sub not exists.
If i comment, it shouldn't work.
Example:
call sub_name_1 /* "sub_name_1" should be highlighted e.g. yellow */
call sub_name_2 /* "sub_name_2" -"- */
call sub_name_3 /* "sub_name_3" doesn't exists (outcommented). Should be e.g. red */
subroutine sub_name_1
endsub
subroutine sub_name_2 {
}
/*
subroutine sub_name_3
endsub
*/
Is this possible?
I already found class & function names highlighting in Vim but this is not all I'm looking for. There is no highlighting of just existing subs.