Community
    • Login

    Save Tab Size for a specific language (different from default value)

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    11 Posts 3 Posters 9.5k Views 2 Watching
    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.
    • Claudia FrankC Offline
      Claudia Frank @zero0n3
      last edited by

      @zero0n3

      normally this gets stored in langs.xml as attribute tabSettings but you are saying custom language
      and this is confusing me.

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • zero0n3Z Offline
        zero0n3
        last edited by

        Hello @Claudia-Frank
        thanks for answer

        yes i mean this (maybe i’m speaking about custom language def but it’s something else):
        https://i.imgsafe.org/618b504744.jpg

        As you can see i selected GMOD LUA (that is my custom language definition) i uncheck USE DEFAULT and then i setted 6 instead of 4 (default value)

        When i close npp, if i re-open that setting i still have for GMOD LUA default checked

        1 Reply Last reply Reply Quote 0
        • zero0n3Z Offline
          zero0n3
          last edited by

          About custom language i mean this tab
          https://i.imgsafe.org/619863478b.jpg

          Claudia FrankC 1 Reply Last reply Reply Quote 0
          • Claudia FrankC Offline
            Claudia Frank @zero0n3
            last edited by

            @zero0n3

            sorry for the late response.

            Did you check it the tabSettings attribute works?

            Cheers
            Claudia

            1 Reply Last reply Reply Quote 0
            • zero0n3Z Offline
              zero0n3
              last edited by

              Hello Claudia
              how can i edit tabSetting attribute for a specific language?
              thanks

              Simon

              1 Reply Last reply Reply Quote 0
              • zero0n3Z Offline
                zero0n3
                last edited by

                If you mean tabSetting inside config.xml that is the dafult value i can see under menù Settings - Preferences - Tab Settings

                If i change the default value it works good when i close and re-open npp but i don’t want to change the default value for ALL languages about tab spaces but only for a specific language and it seems i can do this but only until i close npp :(

                1 Reply Last reply Reply Quote 0
                • Claudia FrankC Offline
                  Claudia Frank
                  last edited by

                  Hello Simon,

                  If you mean tabSetting inside config.xml that is the dafult value i can see under menù Settings - Preferences - Tab Settings

                  yes and no, yes this attribute but no not in config.xml but in langs.xml.

                  You can add it to your language if it isn’t there so something like

                  <Language name="python" ext="py pyw" commentLine="#" tabSettings="136">
                  

                  136 means 8 spaces wide tabs
                  132 means 4 space wide tabs

                  This is working for me.
                  Don’t ask me why it is 136 instead of 8 - no idea.

                  Cheers
                  Claudia

                  1 Reply Last reply Reply Quote 1
                  • zero0n3Z Offline
                    zero0n3
                    last edited by

                    Thanks Claudia i used 134 because i need spacing by 6 (not 8 or 4).
                    Last question: can i also define in langs.xml to NOT replaceBySpace but using always tabs? Like inside Tab Settings in Preferences?

                    I tried to use replaceBySpace=“no”> inside langs.xml but not worked

                    thanks
                    regards

                    Simon

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

                      136 means 8 spaces wide tabs
                      132 means 4 space wide tabs

                      Don’t ask me why it is 136 instead of 8 - no idea.

                      I haven’t studied the code, but when I see a set of small numbers offset by 128 (136 = 128 + 8, and 132 = 128 + 4), I assume that the programmer encoded some flag into the 128’s bit.

                      1 Reply Last reply Reply Quote 2
                      • zero0n3Z Offline
                        zero0n3
                        last edited by zero0n3

                        Thanks Peter for your thinking
                        So you mean that if the number is greater than 128 could mean that 128 added is replaceBySpace = yes?

                        well i try to use only the value 6 instead of 128 + 6 :D

                        UPDATE
                        YESSSSS thanks Peter and Claudia for helping me!
                        it’s exactly as you (and me) told
                        128 + number means
                        replaceBySpace = yes

                        only the number of tabs i want means
                        replaceBySpace = no

                        so i used tabSettings=“6” and worked perfectly!

                        thanks again guys!

                        regards

                        Simon

                        1 Reply Last reply Reply Quote 3

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors