Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

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

    Help wanted · · · – – – · · ·
    3
    11
    8148
    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.
    • zero0n3
      zero0n3 last edited by

      Hello
      i open settings
      Preferences
      Tab Settings
      then i select my custom language
      i de-select USE DEFAULT VALUE and i enter a value

      Until i close npp it works, but when i close npp it loses the new value and i have to set it again when i reopen npp.

      Is it possible to save it somewhere ?
      if so how can i do?
      thanks
      regards

      Claudia Frank 1 Reply Last reply Reply Quote 0
      • Claudia Frank
        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
        • zero0n3
          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
          • zero0n3
            zero0n3 last edited by

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

            Claudia Frank 1 Reply Last reply Reply Quote 0
            • Claudia Frank
              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
              • zero0n3
                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
                • zero0n3
                  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 Frank
                    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
                    • zero0n3
                      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
                      • PeterJones
                        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
                        • zero0n3
                          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
                          • First post
                            Last post
                          Copyright © 2014 NodeBB Forums | Contributors