• Login
Community
  • Login

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

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
11 Posts 3 Posters 8.7k 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.
  • Z
    zero0n3
    last edited by Jun 30, 2016, 6:33 AM

    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

    C 1 Reply Last reply Jun 30, 2016, 11:38 PM Reply Quote 0
    • C
      Claudia Frank @zero0n3
      last edited by Jun 30, 2016, 11:38 PM

      @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
      • Z
        zero0n3
        last edited by Jul 1, 2016, 7:17 AM

        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
        • Z
          zero0n3
          last edited by Jul 1, 2016, 7:41 AM

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

          C 1 Reply Last reply Jul 5, 2016, 9:49 PM Reply Quote 0
          • C
            Claudia Frank @zero0n3
            last edited by Jul 5, 2016, 9:49 PM

            @zero0n3

            sorry for the late response.

            Did you check it the tabSettings attribute works?

            Cheers
            Claudia

            1 Reply Last reply Reply Quote 0
            • Z
              zero0n3
              last edited by Jul 13, 2016, 8:27 AM

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

              Simon

              1 Reply Last reply Reply Quote 0
              • Z
                zero0n3
                last edited by Jul 13, 2016, 9:42 AM

                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
                • C
                  Claudia Frank
                  last edited by Jul 13, 2016, 11:22 PM

                  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
                  • Z
                    zero0n3
                    last edited by Jul 14, 2016, 6:51 AM

                    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
                    • P
                      PeterJones
                      last edited by PeterJones Jul 14, 2016, 12:58 PM Jul 14, 2016, 12:57 PM

                      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
                      • Z
                        zero0n3
                        last edited by zero0n3 Jul 14, 2016, 1:13 PM Jul 14, 2016, 1:10 PM

                        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
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors