Community
    • Login

    Configure style for certain file types

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 2 Posters 414 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.
    • jan benheimJ
      jan benheim
      last edited by

      Hello, I have the following problem: I often work with “.conf” files that always appear in a certain style (blue italic font and red colon).

      I know that I can switch to “normal text” with just one click, but I would prefer .conf files to be displayed as normal text.
      Is this configurable? (and sorry for my english)

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

        @jan-benheim ,

        It’s because the “Properties file” language type uses .conf as one of its default extensions.

        If you had wanted to set the .conf to be some other language (other than “Properties file” or “normal text”), you could have added it to the User ext.: list of that other language using the Style Configurator in the GUI, and the User ext would have taken precedence over the default mapping for that extension. Unfortunately for you, the “normal text” doesn’t have an entry for User ext:. So instead, you will have to manually edit a config file:

        1. Close any .conf files
          • if you leave them open when you exit Notepad++ in the next step, Notepad++ will remember that you had interpreted them as properties files, and it would confuse you into thinking that the changes I am describing didn’t work
        2. Exit Notepad++ completely (this makes sure it won’t accidentally overwrite the changes you will be making)
        3. Open %AppData%\Notepad++\langs.xml in Notepad++
        4. Search for <Language name="props"
        5. In the ext="..." for that XML tag, remove the conf from the list of extensions for that element
        6. Save, and exit Notepad++
        7. Run Notepad++, and now opening a *.conf file should open it as normal text, not as a properties file.
        1 Reply Last reply Reply Quote 3
        • jan benheimJ
          jan benheim
          last edited by

          Hi Peter,

          thank you very much for your detailed help, which immediately worked for me after I had previously tried everything, even reinstalling.

          At some point I thought I had set something wrong, because previously I had been able to open conf-files as normal text without any problems for over 15 years.

          Only after an update was this no longer the case. But anyway, thanks again for your expertise.

          Regards
          Jan

          PeterJonesP jan benheimJ 2 Replies Last reply Reply Quote 0
          • PeterJonesP
            PeterJones @jan benheim
            last edited by

            @jan-benheim said in Configure style for certain file types:

            I had been able to open conf-files as normal text without any problems for over 15 years.
            Only after an update was this no longer the case

            Historical note: conf was added to the Properties filetype in v8.4.8 (December 2022).

            However, updates don’t generally overwrite user-customizable config files in your AppData hierarchy; so your langs.xml might not have been updated until you did something drastic (like deleting your old settings), allowing conf to stay as normal-text longer for you than for a fresh install.

            1 Reply Last reply Reply Quote 2
            • jan benheimJ
              jan benheim @jan benheim
              last edited by

              @PeterJones said in Configure style for certain file types:

              Historical note: conf was added to the Properties filetype in v8.4.8 (December 2022).

              Then everything is clear. As far as possible, I use portable program versions, as was the case with Notepad++ until six months ago. When I then installed it permanently, nothing was overwritten, but there was simply a program behavior that I was not used to.

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