jEdit Community - Resources for users of the jEdit Text Editor
Problem with writing a Mode
Submitted by zorglub76 on Monday, 3 August, 2009 - 13:40
hi all,

i have a problem creating a mode.
i'd like to have some highlighting on the log and i've created this:

http://www.pastie.org/569660

but whenever i put anything like a regex special character (e.g. "\d") in the "end" tag, it selects everything until the end of the page.
for instance, "line " or "line 1" works ok, but "line ." is screwed

any ideas?
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
invalid
by Robert Schwenn on Mon, 03/08/2009 - 21:18
You can't note a regular expression at the END tag, it's only valid for the BEGIN tag.

Robert
 
Wildcards?
by zorglub76 on Tue, 04/08/2009 - 08:03
And is there a way to use wildcards or something in the "end" tag?
I mean something like "something *" (meaning "find the word 'something' and match till the end of that line")
 
Nope
by Robert Schwenn on Tue, 04/08/2009 - 17:59
Sad
 
Damn..
by zorglub76 on Wed, 05/08/2009 - 14:53
Sad
P.S.
by zorglub76 on Mon, 03/08/2009 - 14:16
Also, how can I match the first of the two literals?

For example, i have this:

ok 818 - type ("input_122684", "survey_title_LENNPxidhq51562@a]_a")

and I want the first literal (input_122684) to be different color than the other (survey_title_LENNPxidhq51562@a]_a)
 
csv mode
by Robert Schwenn on Mon, 03/08/2009 - 21:24
The current development version (jEdit 4.3pre17) is shipped with a csv mode witch highlights the values of a csv file alternating in two colors.

Have a look at this mode definition file. I can't understand it Eye-wink

Robert
 
Uhhhh....
by zorglub76 on Tue, 04/08/2009 - 08:21
Well, someone probably understands this file.. Smiling
Never mind. I'm not desperate to have the literals colored differently.

Anyway, they should have definitively chosen a scripting language for Mode files instead of XML.

Thanks!
User login
Browse archives
« September 2024  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   98100
Context Free Art (*.cfdg)   0.31   46062
BBEdit scheme   1.0   18601
JBuilder scheme   .001   18502
ColdFusion scheme   1.0   18031
R Edit Mode - extensive version   0.1   17480
Advanced HTML edit mode   1.0   16213
Matlab Edit Mode   1.0   16075
jEdit XP icons   1.0   15236
XP icons for jEdit   1.1   14300