Community
    • Login

    Doesn't highlight syntax of .gitconfig files

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 335 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.
    • AntonA
      Anton
      last edited by Anton

      Notepad doesn’t highlight syntax of .gitconfig files .
      It shows the file as plain-text.
      I know that I can fix it manually (menu Language) but I need Notepad++ to detect it automatically according to file extension.
      Hm…
      I’ve just found that on my first workstation it happens but doesn’t happen on another workstation.
      I’ve found difference between default settings in Style Configurator.
      By default it has only “properties” extension.
      But another workstation with the same version of Npp has these default extensions (and gitconfig amidst):
      properties conf cfg gitattributes gitconfig gitmodules editorconfig

      How to explain it? what’s the reason?

      alt text
      alt text

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn
        last edited by

        If I were you, I’d try putting gitconfig in the User ext. box.

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

          @Anton said in Doesn't highlight syntax of .gitconfig files:

          But another workstation with the same version of Npp has these default extensions…
          How to explain it? what’s the reason?

          Before Notepad++ v8.4.8, the “Properties file” filetype only had default extensions of .properties (as shown as Default ext.: properties in your screenshot, which is stored in langs.xml). Starting in v8.4.8, it has a longer list of extensions by default (Default ext.: properties conf cfg gitattributes gitconfig gitmodules editorconfig). [1]

          However, if on one machine, you had installed with an older version and then upgraded to a more recent version, it wouldn’t have updated langs.xml (because Notepad++ does its best to not overwrite your customized config files), so you could have the same version (for example, v8.5.7) on both machines now, but since one started before v8.4.8, and the other started after v8.4.8, one shows the newer config and the other does not.

          If you ever want to reset to the “official” langs.xml, you can close Notepad++, delete %AppData%\notepad++\langs.xml, and restart Notepad++: it will re-create langs.xml from the langs.model.xml in your installation directory, which will be the version of that config file that ships with Notepad++ of the specific version you’re using – at the expense that if you’d customized anything in langs.xml, that customization will be gone.

          You can also do something like use the ComparePlus plugin to compare %AppData%\notepad++\langs.xml in the left view to c:\program files\Notepad++\langs.model.xml in the right, and see where the differences are, and then copy over just the new features that you want from langs.model.xml, without getting rid of your customizations. But that takes more effort on your part.

          AntonA 1 Reply Last reply Reply Quote 4
          • AntonA
            Anton @PeterJones
            last edited by

            @PeterJones thanks!

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