ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

notepad2-mod: custom code folding for txt files?

<< < (5/5)

dr_andus:
three hypens ( --- ) at the start of a line triggers the "Document" syntax for YAML, which can be used as a colored horizontal line separator.
-Nod5 (October 27, 2013, 04:14 AM)
--- End quote ---

I had to reinstall Notepad2-mod on a new Win7, 64-bit machine (using the most recent Notepad2-mod (64-bit) v. 4.2.25 r964 (ba441e6)), and for some reason I'm unable to import my old settings, so I tried to recreate the YAML scheme from scratch.

Was it just my imagination or were three hyphens ( --- ) supposed to trigger a horizontal rule that stretched across the entire line or only until you kept adding hyphens (-------------), which is the current behaviour?

dr_andus:
I specified the comment syntax (everything after #) as bold headings and any word suffixed with : gets color background.
-Nod5 (October 27, 2013, 04:14 AM)
--- End quote ---

This also stopped working for me for some reason  :(

Now comment highligthing after hash (#) and colon (:) only works if the line does not start with a Tab. I don't mind that behaviour for the colon (actually I prefer it), but with # this means I can't use them for folding Markdown headers because I can't create foldable sub-headings by hitting Tab and starting a level 2 (##) etc. heading.

Actually starting the line with # even prevents the creation of a folding point now, so it definitely doesn't work for use as Markdown headings.

Any ideas how to fix this? It used to work before.

Nod5:
Hi, the old steps still work for me

First click view > customize schemes...
Then in the popup window:
- Default text > associated filename editbox: remove txt
- YAML > associated filename editbox: add txt
- YAML >
comment: change to: bold; fore:#0A246A
identifier: change to: bold; fore:#0A246A;back:#D7D7FF
error: clear the style editbox
document: back:#DDDDFF

Now comment highligthing after hash (#) and colon (:) only works if the line does not start with a Tab.
-dr_andus (December 07, 2015, 07:59 AM)
--- End quote ---
IIRC it always was like that. But you can enable settings > Insert Tabs as Spaces and then #example will be styled even if tab indented.

Was it just my imagination or were three hyphens ( --- ) supposed to trigger a horizontal rule that stretched across the entire line or only until you kept adding hyphens (-------------), which is the current behaviour?
-dr_andus (December 07, 2015, 07:59 AM)
--- End quote ---

That is configurable. Change from

--- ---document: back:#DDDDFFto

--- ---document: back:#DDDDFF; eolfilledand the color will be to the end of the line filled

dr_andus:
Nod5

Thank you very much for your time, it's all working now as expected.  :Thmbsup:

Nod5:
Glad to help  :Thmbsup:

Navigation

[0] Message Index

[*] Previous page

Go to full version