jEdit Community - Resources for users of the jEdit Text Editor
Ruby mode
Submitted by mewshie on Wednesday, 23 June, 2004 - 18:47
Has anyone gotten indenting to work properly in ruby mode? For example, when inside of a method (inside of a def statement), jedit automatically defaults to the _same line_ that the def is on -- no indenting happens. Also, it doesn't recognize the "end" statement, or push it back an indenting level. Thanks for any help

Nate
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
New Ruby mode and Ruby commando files available
by Tsela on Fri, 02/07/2004 - 07:57
I've uploaded my Ruby mode file as well as the Ruby commando file I developed. The Ruby mode handles indenting as well as jEdit makes it possible, and the Ruby commando allows you to run your scripts directly from jEdit. They are now available for download for anyone who wants to use jEdit to program in Ruby in a more user-friendly way Smiling .
Ruby mode
by Tsela on Thu, 01/07/2004 - 20:04
I know the problem. To solve it, I had to modify the Ruby mode xml file to allow for auto-indenting. The original one didn't have any. I was thinking about giving back my modified ruby.xml mode file, but I don't know whether the original authors would agree...

As for the "end" problem, it cannot be solved. Currently jEdit only accept brackets to push back an indenting level. There is a thread in the "feature request" forum about modifying that to allow regexes to be defined for such a feature, thus making it possible to write a mode file that does correct back-indenting.

You may want to modify the ruby.xml mode file yourself (it's not hard at all Smiling ). By installing the modified one in the "modes" folder of your settings directory (with a catalog file so that jEdit can find it), it will be used instead of the standard one.

I will see whether I can get my modified Ruby mode file into the project...
 
Solution to Ruby auto indent problem in jEdit
by robmckinnon on Sun, 22/08/2004 - 20:21
I have solved the auto indent and "end" problems by writing a new beanshell jEdit macro and further augmenting the Ruby edit mode.

The Ruby auto indent and insert end macro and Ruby edit mode v0.3 will solve most of your Ruby indenting needs! Download, install and enjoy them now! Smiling
User login
Browse archives
« April 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   82349
Context Free Art (*.cfdg)   0.31   46055
BBEdit scheme   1.0   18595
JBuilder scheme   .001   18495
ColdFusion scheme   1.0   18024
R Edit Mode - extensive version   0.1   17473
Advanced HTML edit mode   1.0   16206
Matlab Edit Mode   1.0   16068
jEdit XP icons   1.0   15229
XP icons for jEdit   1.1   14293