jEdit Community - Resources for users of the jEdit Text Editor
Get environment variable from Windows
Submitted by Anonymous on Friday, 16 January, 2004 - 16:13
I am not a java programmer, so I'm not sure where or how to do it, but is there a way to get an environment variable into a macro variable? I would like to use environment variable %USERPROFILE% so that when I copy my .jedit folder to other computers that I use, all of my macros, and configurations work as they should on the other computers, seamlessly without modification. Example macro:
user = "grymmjack";
quot = "\"";
prog = "hh";
file = "C:\\Documents and Settings\\" + user + "\\.jedit\\reference\\php.chm";
line  = quot + prog + quot + " " + file;
runCommandInConsole(view, "System", line);
  
Regular expression in macro doesn't work
Submitted by Anonymous on Tuesday, 23 December, 2003 - 23:48
Hi, Macros like below
 
>>>>
    Pattern p = Pattern.compile("*.\(([0-9]+)\).*");
    lineText = textArea.getLineText(line);
    Matcher m = p.matcher(lineText);
>>>>

or 

>>>>
gnu.regexp.RE re = new gnu.regexp.RE("^(\*.)\\t(\*.)\\t(\*.)$");
lineText = textArea.getLineText(line);
gnu.regexp.REMatch match = re.getMatch(lineText);
lineText = "<1>=" + match.toString(1) + "<2>=" + 
   match.toString(2) + "<3>=" + match.toString(3);
>>>>
don't work. Parsing fails on both. Does it mean I can't use any regular expressions in macros or am I doing something wrong?
How to Un-comment a selection
Submitted by orapower on Wednesday, 17 December, 2003 - 17:36
I'm looking to do the opposite of applying comments (both line and range) to a selection. Any idea how to do this?
User login
Browse archives
« June 2026  
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   130670
Context Free Art (*.cfdg)   0.31   46079
BBEdit scheme   1.0   18614
JBuilder scheme   .001   18515
ColdFusion scheme   1.0   18048
R Edit Mode - extensive version   0.1   17498
Advanced HTML edit mode   1.0   16231
Matlab Edit Mode   1.0   16093
jEdit XP icons   1.0   15250
XP icons for jEdit   1.1   14314