Folding plaintext like python

61 views
Skip to first unread message

fogus

unread,
Aug 1, 2009, 6:50:08 PM8/1/09
to scite-interest
Hello.
I would like to fold plain text documents (and possibly others) just
like python is folded. How can this be configured?
Note: I do not want to fold like this: http://lua-users.org/wiki/SciteTextFolding
(see also http://writing.hed854.net/2007/11/text-folding-in-scite.html
)

How can I do this?

Also, my Python file has the following:
---
statement.indent.$(file.patterns.py)=5 shdghgjghjkSFGHCFGH \
hjfghjghjkghkljhlhddwwgbnn

statement.lookback.$(file.patterns.py)=0
block.start.$(file.patterns.py)=
block.end.$(file.patterns.py)=
---

Can someone explain that to me? What does shdghgjghjkSFGHCFGH
hjfghjghjkghkljhlhddwwgbnn do specifically?

Neil Hodgson

unread,
Aug 1, 2009, 7:03:00 PM8/1/09
to scite-i...@googlegroups.com
fogus:

> Can someone explain that to me?  What does shdghgjghjkSFGHCFGH
> hjfghjghjkghkljhlhddwwgbnn do specifically?

It makes no sense to me.

Neil

Randy Kramer

unread,
Aug 1, 2009, 9:24:20 PM8/1/09
to scite-i...@googlegroups.com
On Saturday 01 August 2009 07:03:00 pm Neil Hodgson wrote:
> fogus:
> > Can someone explain that to me?  What does shdghgjghjkSFGHCFGH
> > hjfghjghjkghkljhlhddwwgbnn do specifically?

I think it is just dummy text--he doesn't want to show the real text
here because it is confidential, so he's just saying something
like "blah blah blah" or foo, bar, baz.

Randy Kramer
--
I didn't have time to write a short letter, so I created a video
instead.--with apologies to Cicero, et.al.

KHMan

unread,
Aug 2, 2009, 12:23:07 AM8/2/09
to scite-i...@googlegroups.com
fogus wrote:
> Hello.
> I would like to fold plain text documents (and possibly others) just
> like python is folded. How can this be configured?
> Note: I do not want to fold like this: http://lua-users.org/wiki/SciteTextFolding
> (see also http://writing.hed854.net/2007/11/text-folding-in-scite.html
> )

The trouble with your request is that if other people insist on
folding text files exactly the way they want, but differently,
then we might end up with fistfights. :-) :-)

Someone is doing a lexer for reStructured text, which is very
close to wiki source. This might be more to your taste.

Yes, a script-customizable thingy can solve all of this. But
someone has to write it first...

> [snip snip]

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia

fogus

unread,
Aug 3, 2009, 4:02:19 PM8/3/09
to scite-interest
> The trouble with your request is that if other people insist on
> folding text files exactly the way they want, but differently,
> then we might end up with fistfights. :-) :-)

Easy: create a fold.style.$(filepattern.<xx>)=<your_pattern_here>
variable and allow <your_pattern_here> to be any of the existing
styles (including the python style).

On Aug 1, 9:23 pm, KHMan <keinh...@gmail.com> wrote:
> fogus wrote:
> > Hello.
> > I would like to fold plain text documents (and possibly others) just
> > like python is folded.  How can this be configured?
> > Note: I do not want to fold like this:http://lua-users.org/wiki/SciteTextFolding
> > (see alsohttp://writing.hed854.net/2007/11/text-folding-in-scite.html

xtian

unread,
Aug 3, 2009, 5:17:56 PM8/3/09
to scite-interest
I do something similar - I write in a proprietary script language and
find the formatting conventions useful enough that I keep my
production notes in text files with that extension (so I use the same
lexer)

If you're just looking for folding and maybe some simple features in
addition to that, you might copy the python.properties file and
configure it to work with the txt extension. You can strip out
keywords as you see fit. Additionally you may have to remove any
existing .properties file that is set to work with that extension.

another useful thing is to edit the language menu list (in global
properties) so that the lexers you like to use appear there and have
hot keys to set.

-Cheers, Christian

On Aug 1, 3:50 pm, fogus <jgspr...@gmail.com> wrote:
> Hello.
> I would like to fold plain text documents (and possibly others) just
> like python is folded.  How can this be configured?
> Note: I do not want to fold like this:http://lua-users.org/wiki/SciteTextFolding
> (see alsohttp://writing.hed854.net/2007/11/text-folding-in-scite.html

fogus

unread,
Aug 4, 2009, 4:30:10 PM8/4/09
to scite-interest
xtian,
I fear that this is one of the most misunderstood things about SciTE:
the .properties files DO NOT contain all of the information necessary
to interpret a language. Some of that information (like folding) is
inside either .dll or .exe files and is not currently assessable. In
fact, what I am asking for is for folding configuration to be more
exposed since it currently is built in to the code.

Copying .properties files is simply not enough.
Reply all
Reply to author
Forward
0 new messages