Code explorer methods shown as "Other"

Discuss syntax highlighting or submit new syntax files.
Post Reply
Ger Teunis
Posts: 105
Joined: 11 Apr 2008 11:50
Location: The Netherlands

Code explorer methods shown as "Other"

Post by Ger Teunis »

Because I work a lot with bash scripts which have lots of methods I wanted to add the ability to view methods in "Code explorer"

Syntax of functions are
functioname()
{
//some methods here
}

What I did:
Opened "Syntax editor", opened bash syntax.
Went to code folder/explorer

and made sure the following items where added
Fold_begin {
Fold_end }
Fold_List_item = ceMethod.

But for some reason with the above configurtion all methods are visable, but only in "Unknown objects".

Second item:
Tracking doesn't work for unknown in 5.10.

Third:
Is it possible to select the first item in "general" when only one item (like Module) is available?
User avatar
Rickard Johansson
Site Admin
Posts: 6628
Joined: 19 Jul 2006 14:29

Post by Rickard Johansson »

Enter

Fold_begin {
Fold_end }
Fold_List_item <empty>

and enter something in List_Exclude=<string>|<string>...

For some reason List_Exclude need at least 1 string for it to work :D
Ger Teunis
Posts: 105
Joined: 11 Apr 2008 11:50
Location: The Netherlands

Post by Ger Teunis »

Thanks, that worked!
It seems that active method tracking doesn't work at the moment.

Also, could you give me suggestion about:

But in bash I also can have constructs like

Code: Select all

TEMP="`cat "$path/appinfo.json" | grep -v "enabled" | sed "s/{/{\\n    enabled=\\"1\\",/g"`"
The s/{/{\\n part of this line breaks the method detector, all subsequent methods are not found anymore.

Can I configure the syntax that subsequent items are detected?
I.e. using the ` and start and end for a block or so?
(` cause the text in between to be executed, no need to detect methods there)
User avatar
Rickard Johansson
Site Admin
Posts: 6628
Joined: 19 Jul 2006 14:29

Post by Rickard Johansson »

You could try this:

Code: Select all

BlockName = Modifiers ?
BlockOnLine = Yes
BlockAsString = Yes
BlockStart = /
BlockEnd = <empty>

and

EndOpenBlockAt = 0123456789+-*/\=[]();:.,'"
It may give some strange highlighting at times, e.g. appinfo will be highlighted in $path/appinfo.json
Ger Teunis
Posts: 105
Joined: 11 Apr 2008 11:50
Location: The Netherlands

Post by Ger Teunis »

Nice hack around :)
Thanks, it did work!
Post Reply