Save Tab Size for a specific language (different from default value)
-
normally this gets stored in langs.xml as attribute tabSettings but you are saying custom language
and this is confusing me.Cheers
Claudia -
Hello @Claudia-Frank
thanks for answeryes i mean this (maybe i’m speaking about custom language def but it’s something else):
https://i.imgsafe.org/618b504744.jpgAs 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
-
About custom language i mean this tab
https://i.imgsafe.org/619863478b.jpg -
sorry for the late response.
Did you check it the tabSettings attribute works?
Cheers
Claudia -
Hello Claudia
how can i edit tabSetting attribute for a specific language?
thanksSimon
-
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 :(
-
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 tabsThis is working for me.
Don’t ask me why it is 136 instead of 8 - no idea.Cheers
Claudia -
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
regardsSimon
-
136 means 8 spaces wide tabs
132 means 4 space wide tabsDon’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, and132 = 128 + 4), I assume that the programmer encoded some flag into the 128’s bit. -
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 = yesonly the number of tabs i want means
replaceBySpace = noso i used tabSettings=“6” and worked perfectly!
thanks again guys!
regards
Simon
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