Closed Konfekt closed 5 years ago
Absolutely!
After playing with this, the restriction of 'define' is that it expects the label after the regex pattern. For example in Javascript, if we wanted to declare methods as macros, then among all the possible regular expressions indicating methods as listed on https://github.com/romainl/ctags-patterns-for-javascript#methods what is left are
setlocal define=^\\s*this\\.\\\|^\\s*static\\s\\+
Perhaps better would be scan for the regexes of classes as listed in https://github.com/romainl/ctags-patterns-for-javascript#patterns-6
Perhaps you have an opinion on what kind of objects &l:define
should look for in languages other than C
and C++
where macros do not exist?
For a language like JavaScript I'm inclined to write it off as a lost cause and use ctags.
Inspired by https://vimways.org/2018/death-by-a-thousand-files/ , might this be an appropriate place to contribute sensible settings of
&define
, on top of&include
and&path
, as well?