Community
    • Login

    Default LF and not CRLF

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 76 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.
    • F
      flaviozluca
      last edited by

      Friends,

      I set the default of LF instead of CR LF, it works in that instance, but if I open a new instance of Notepad++, it changes back to CRLF.

      No way to keep it LF always?

      386ca519-1979-4aab-9f0d-ef5dbf0f6b0a-image.png

      Thanks

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

        @flaviozluca said in Default LF and not CRLF:

        I open a new instance of Notepad++, it changes back to CRLF.

        Notepad++ only saves settings to disk when it exits. Thus, if you don’t exit after you make a settings change, the new instance cannot know about that settings change.

        Also, if you have more than one instance open, only one instance (in theory, the last to close) has permission to write the settings to disk. Thus, if you currently have two or more instances open, you’ve got no real way of knowing which has permission to write settings to disk. If you want to make a permanent change to settings when you have multiple instances open, the best thing to do is to exit all instances, start one new instance, make the settings change and exit (to write the settings to disk), then from then on, new instances will make use of the new setting.

        (Handling settings-changes is one of the places where multi-instance doesn’t work great.)

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

          @PeterJones said in Default LF and not CRLF:

          only one instance (in theory, the last to close) has permission to write the settings to disk.

          that (or my original phrasing of “in theory, the first instance”) are both technically right, and practically wrong. it’s actually very confusing, and it depends on which configuration file you are talking about.

          I took a portable, and put it into multi-instance mode. then opened two instances. Instance 1, I set to Dark Mode + Small Toolbar Icons, instance 2 I set to Light Mode + Big Toolbar Icons. I closed Instance 2, and looked, and saw that config.xml was saved, but session.xml did not save. then I closed Instance 1, and saw that config.xml was saved again and session.xml was saved this time. So in this run, both were able to write to config.xml, but only the first instance was able to write to session.xml. When I ran one instance of Notepad++ after this, it was in Dark Mode + Small Toolbar, which shows that instance 1 definitely “won” for the config.xml

          I started a new pair of instances – this time, they both started out in Dark Mode + Small Icons. Then I changed Instance 1 to Light Mode + Small Icons, and changed Instance 2 to Dark Mode + Big Icons. I closed instance 1, and saw that both config.xml and session.xml were saved. Then I closed instance 2 and saw that config.xml was saved but session.xml was not. This seems to confirm my working mental model. When I started one instance after this, it was Dark Mode + Big Icons, which was the instance 2 setting, and thus the last one closed “won” for config.xml again.

          Hence, the way I will phrase things, at least based on my best understanding for now:

          When multiple instances of Notepad++ are open, each will write its config.xml when it exits, so the last instance closed is the one whose config.xml will “win”. However, only the first instance of Notepad++ in multi-instance mode gets permission to write to session.xml, so only that first instance will ever save its session.

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