atom / bracket-matcher

Jump to brackets
MIT License
142 stars 98 forks source link

Feature Request: match C/C++ preprocessor directives #400

Open lzkelley opened 4 years ago

lzkelley commented 4 years ago

Summary

I get the sense that atom is used a bit less for c/c++, but still - a really helpful feature would be to also match and highlight preprocessor directives in c. These can be especially hard to follow/match manually because they don't follow the local indentation of general code. e.g.

#ifdef DIRECTIVE   /* <--- this matches */
    /* some c code ... */
    int num;
    int *pnt;  /* oooh a pointer */
#endif             /* <--- this */

Describe alternatives you've considered

Though it is more common to not indent preprocessor directives at all, this is primarily for historical reasons (to my knowledge), and using indents does help aid matching --- but, of course, much less so when there's lots of nesting and the matching statements are pages away.