Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 20 Nov 2017, 09:59
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to customize text folding in Geany?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 1390
Location: Japan

PostPosted: Sun 19 Apr 2015, 08:14    Post subject:  How to customize text folding in Geany?  

Geany has the ability to fold/unfold parts of a document. Generally a good idea, but a strange folding policy makes this feature hard to use.

My biggest problem: When using a here string ( that's what the '<<<' in the screenshot is doing) in a script, Geany opens a fold section at the left edge, which extends to the very end of the document. Makes no sense. Is there any way to tell Geany to ignore the tripple '<<<'? Geany documentation explains how to customize the appearance of the folding but it gives no clues as to how to define the elements that should be folded. Does anyone know a solution or work around? I'm not looking for a way to avoid the use of here strings, I'm looking for a way to prevent folding.
here_string_bug.png
 Description   
 Filesize   37.51 KB
 Viewed   275 Time(s)

here_string_bug.png

Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 650

PostPosted: Sun 19 Apr 2015, 23:18    Post subject:  

Perhaps, there is a way to make it parse "here strings" before it parses "here docs". If greeny somehow mistakes a here-string for a here-doc than this behavior would make sense.
Back to top
View user's profile Send private message 
Uten


Joined: 29 Jan 2008
Posts: 109

PostPosted: Mon 20 Apr 2015, 10:29    Post subject:  

A workaround I use is to wrap the troublesome code with code block markers
Code:
{ # I describe the block here
   while read File
        # Do some work
   done <<< filename "test" } # End of block


I have not found an easy way to do custom folding in geany. If anyone has please share. Wink
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1390
Location: Japan

PostPosted: Mon 20 Apr 2015, 21:49    Post subject:  

s243a wrote:
Perhaps, there is a way to make it parse "here strings" before it parses "here docs".
Indeed folding stops when the here string is part of a here doc, but that's invalid nonsense code. Not a solution.

Uten wrote:
A workaround I use is to wrap the troublesome code with code block markers
This only creates additional folding, but doesn't solve the problem.
funnyfolding.png
 Description   
 Filesize   20.07 KB
 Viewed   191 Time(s)

funnyfolding.png

Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1390
Location: Japan

PostPosted: Sun 22 Oct 2017, 22:30    Post subject:  

Still unsolved and still driving me nuts.
There must be a way to stop '<<<' from folding the whole page. Any new ideas?
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1390
Location: Japan

PostPosted: Mon 30 Oct 2017, 06:54    Post subject:  

Aaah...there is a way: Upgrading my Geany version 1.23.1 to version 1.25.
Bug is gone.

Unfortunately they "fixed" what wasn't broken. From the release notes 1.25: "Do not comment out blank lines when toggling comments". Sounds reasonable but is a stupid fix. Before I could select a code area, of course including blank lines, hit Ctrl+E and the whole selection would be commented out and would fold as one block. Now folding is interrupted by all these uncommented blank lines. Not what I need.
Back to 1.23.1 Crying or Very sad
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4716
Location: Republic of Novo Zelande

PostPosted: Mon 06 Nov 2017, 04:36    Post subject:  

Does leafpad (or other minimal text editor) display it the same as geany?
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0422s ][ Queries: 13 (0.0086s) ][ GZIP on ]