I have a couple of text files that look alot like the old windows ini files. I have been able to port them over from my old TextPad syntax files and they look great. The one feature I would really like to enable is folding based on [Sections].
I have been able to figure out almost how to get there. It is clear that notepad++ can do this just fine using the built in .ini file processor but when I try to mimic this with a user defined file I'm having no luck. It appears that it is using the "ini_section" to specify a custom parser named ini_section.
I can't see how to make my UDL use this parser to parse my files correctly.
Is there an example somewhere that shows how to do this...or even just a hint of how to connect this configuration setup with my UDL?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I save my file off with .ini extension it works fine because it is using the built in support for MS INI. I have tried many permutations editing the function list, UDL file and langs.xml without luck
Last edit: Chuck 2015-02-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't need any support for blank or empty lines.
There currently is support for INI files in Notepad++. My format is EXACTLY the same as INI files and my files are folded correctly with Notepad++ regardless of blank lines IF I save them with .ini file extension (e.g. change .spr to .ini). What must I do to allow notepad++ to treat files with my file extension (.spr in this case) the same way as it treats INI files?
If I add .SPR in the lang.xml file like this:
<Language name="ini" ext="ini inf reg url spr" commentLine=";">
</Language>
The code is folded just fine..but I loose my keywords...
Last edit: Chuck 2015-02-13
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a couple of text files that look alot like the old windows ini files. I have been able to port them over from my old TextPad syntax files and they look great. The one feature I would really like to enable is folding based on [Sections].
I have been able to figure out almost how to get there. It is clear that notepad++ can do this just fine using the built in .ini file processor but when I try to mimic this with a user defined file I'm having no luck. It appears that it is using the "ini_section" to specify a custom parser named ini_section.
I can't see how to make my UDL use this parser to parse my files correctly.
Is there an example somewhere that shows how to do this...or even just a hint of how to connect this configuration setup with my UDL?
Hi Chuck,
can you share a small code sample so I could see what are you trying to fold?
Regards,
Loreia
Sure, the files configure many views that a camera takes, as well as some support config data.
[UserDialog]
Height = 640
Width = 480
[View1]
StartHeight = 3.8500 in
EndHeight = 20.4000 in
ScanSpeed = 0.3500 in/s
Angle = 0
ReverseSpeed = 2.0000 in/s
TimeOffset = 5
[View2]
StartHeight = 3.8500 in
EndHeight = 20.4000 in
ScanSpeed = 0.3500 in/s
Angle = 35
ReverseSpeed = 2.0000 in/s
TimeOffset = 5
I would like to fold this down to
+[UserDialog]
+[View1]
+[View2]
If I save my file off with .ini extension it works fine because it is using the built in support for MS INI. I have tried many permutations editing the function list, UDL file and langs.xml without luck
Last edit: Chuck 2015-02-12
Hi Chuck,
this is not possible. To support this, UDL would need to support "empty line" as keyword type.
Best regards,
Loreia
Loereia2:
I don't need any support for blank or empty lines.
There currently is support for INI files in Notepad++. My format is EXACTLY the same as INI files and my files are folded correctly with Notepad++ regardless of blank lines IF I save them with .ini file extension (e.g. change .spr to .ini). What must I do to allow notepad++ to treat files with my file extension (.spr in this case) the same way as it treats INI files?
If I add .SPR in the lang.xml file like this:
<Language name="ini" ext="ini inf reg url spr" commentLine=";">
</Language>
The code is folded just fine..but I loose my keywords...
Last edit: Chuck 2015-02-13
Hi Chuck,
see for example here:
http://allthingsmarked.com/2009/07/29/associate-file-extensions-with-specific-languages-in-notepad-plus-plus/
Best regards,
Loreia
Last edit: Loreia2 2015-02-13