Replies: 2 comments 7 replies
-
FWIW, such a settings file can also be shipped within the theme package, provided that it already contains a dummy syntax for C++ header files (which is at the moment required anyway if you want to have different icons for
That said, having a dedicated syntax (and removing or modifying the settings file) for C/C++ header files included in this repository would frankly make things easier for theme and icon package authors. |
Beta Was this translation helpful? Give feedback.
-
|
Back when I "learned" C++, I put very different things in header files than I did in .cpp files. Is it basically valid to put any C++ in a header? Or just constants and declarations? If so (or even if someone just wants to make their own opinionated third party package), you could do something like this mockup: %YAML 1.2
---
name: C++ Header
scope: source.c++.header
file_extensions:
- h
- hh
- hpp
- hxx
- hpp
contexts:
main:
- include: Packages/C++/C++.sublime-syntax#declarations
- include: Packages/C++/C++.sublime-syntax#constants |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Currently, if a user wants to show a different file icon for C/C++ header files, a
Packages/User/C++.sublime-settingsfile must be created to remove the"h"extension. See AFileIcon #51 and AFileIcon #97.Could a separate syntax be created in the C++ package for header files? This would allow for custom header icons as well as custom syntax extensions which only affect headers.
Something like:
Packages/C++/C++ Header.sublime-syntax:
Packages/C++/C++ Header.sublime-settings:
{ "extensions": [ "h" ] }Beta Was this translation helpful? Give feedback.
All reactions