jEdit Community - Resources for users of the jEdit Text Editor
Odd coding style support?
Submitted by Langman on Monday, 4 October, 2004 - 18:08
Hi,

I just started working on a new project that is using a very unique (read: I hate it) codeing style..

Any idea how I can modify the cplusplus.xlm so that it is more friendly to this style???

int x(int i)
...{
...switch(i)
......{
......case 1:
.........return 10;
......}
...return i;
...}

(ignore the dots. They were needed to maintain the structure)

Note that the body code and the {} line up, which is different from the so called "GNU coding style". I got it working so that the '{' is indented correctly but I can't seem to prevent jEdit from indenting again for the line following the '{'. Also, I can't see how I can tell jEdit to reduce the indent level for lines following a '}'..

Any help would be much appreciated.
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Coding with idented braces
by Anonymous on Fri, 07/01/2005 - 13:41
I have the same problem. I just started using jEdit (for embedded C), after working through all it's mighty features I could setup an enviroment that really suits me.

The only thing I could not get to work yet are those barces (I have a large code-base in this style):

if(this_would_be_possible)
...{
...it_would_be_great();
...}
else
...{
...i_can_not_understand_why_not_everybody_use_this_style();
...}

Thank you,

Thomas

P.S.: replace the dots with spaces...
 
solution for other coding-style
by Anonymous on Sat, 08/01/2005 - 15:07
I see, I have to help myself. Here we go...

You can download a macro for my prefered coding-style from:
http://www.entner.biz/downloads/nice_newline_ident.bsh

See the instructions in the comment. And please excuse, it's my first jEdit-macro... I have not used it much yet, if I find a problem, I will update the file.

Maybe, someone in turn can explain me why most people are using the coding-style supported by jEdit? It looks less intuitive to me as I think the braces are belonging to the idented block and not to the statement above.

Regards

Thomas

P.S.: I think that this coding-style should also be supported by jEdit as an option!
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   99587
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