Community
    • Login

    Suggestion: make inc files not default associated with any language

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 224 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • SykledustS
      Sykledust
      last edited by

      Most programming languages have the possibility to include source a file into another, and I think it is quite common that such a file have the file extension “inc” to separate them from other source code files.

      Currently inc-files are default associated with Pascal, and in order to allow automatic syntax highlighting one have to edit “%AppData%\Notepad++\langs.xml”, and (in my experience) this has to be re-done for every NP++ update.

      My suggestion is to “prohibit” the inc extension to be associated with any language by default, so that one can add it to the user extensions for the language you’re (currently) using. (The prohibition would probably need to be enforced simply “by rule/convention”, and not hard coded in the software)

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Sykledust
        last edited by

        @Sykledust said in Suggestion: make inc files not default associated with any language:

        in order to allow automatic syntax highlighting one have to edit “%AppData%\Notepad++\langs.xml”, and (in my experience) this has to be re-done for every NP++ update.

        In the Settings > Style Configurator, you can literally just go into the language you do want it to be, go to the User ext.: box and add it – no editing of langs.xml needed. Here’s a screenshot of adding it to the C language: e27f3429-368c-456b-a82f-59255f616620-image.png

        Once you’ve hit Save & Close from the Style Configurator, then the next time you open an *.inc file in Notepad++, it will be under the new language, not Pascal, because user-extensions take priority over the default list from langs.xml. This change, like other user-defined changes, does stay chosen if you do a normal update of Notepad++, because Notepad++ updates (under normal circumstances) do not overwrite the user-edited config files.

        this has to be re-done for every NP++ update.

        Even if you did it in langs.xml, this is incorrect: a normal upgrade does not delete or overwrite %AppData%\Notepad++\langs.xml or other such files – so unless you deleted that file (or the whole %AppData%\Notepad++\ folder), or something else weird was going on, it would keep that choice.

        (Obviously, installing on a new computer will require making the config change again, but this is true for every option in Notepad++.)

        1 Reply Last reply Reply Quote 4
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors