jEdit Community - Resources for users of the jEdit Text Editor
Case conversion on language keywords.
Submitted by Anonymous on Wednesday, 4 February, 2004 - 18:27
jEdit is being used at my company for editing source code written in our proprietary language. We have already defined a new language mode and registered it in the catalog. Syntax highlighting for our language works perfectly at this point.

My company's language's keywords are all in upper case, while variable, function and other identifiers are all in lower case, and this rules are enforced by our compiler. When writing code, it is actually a pain to use the CAPS LOCK key constantly to switch between lower and upper case, so we are wondering whether jEdit can do upper case conversion automatically on keywords just as it highlights them (that way we could take advantage of the rules we specified in our custom mode for this purpose and we would not need any additional programming). The DOS-based editor we used previously had this capability.

Is this feature already included in jEdit? We have not been able to find it in the user's guide. We are using jEdit 4.2-pre8. Should I post this as a Feature Request?

I believe this feature would be useful for people working in other languages as well; for example, I think SQL programmers will like it (yes, I have already checked out the tsql mode for guidance, but I could not find anything regarding this matter -- it ignores the case when highlighting and does not do case conversion).

Thank you.
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Case conversion macro included in jEdit 4.2pre11
by Anonymous on Thu, 25/03/2004 - 15:49
In response to this matter, the /macros/Editing/Keywords_to_Upper_Case.bsh macro was included in the standard jEdit 4.2pre11 distribution. The macro is very fast and (naturally) one can assign a keyword shortcut to it, or perhaps even better, assign the following macro to the ActionHooks plug-in's BufferUpdate.SAVING event.

void upperCaseKeywordsByMode(View view) {
// XXX put your mode name below
if (view.getBuffer().getMode().getName().equalsIgnoreCase("XXX")) {
view.getInputHandler().invokeAction("Editing/Keywords_to_Upper_Case");
}
}

upperCaseKeywordsByMode(view);
you may use a macro in between..
by nothere on Fri, 27/02/2004 - 11:52
there's been a thread in the mailinglist, which discusses this topic.

http://sourceforge.net/mailarchive/message.php?msg_id=7241746

hope this helps.
mario
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   99105
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