List of Ruby capable text editors?

Hi…

short question: is there somewhere a comprehensive list of Ruby
syntax-highlightning capable text editors (on Linux)?

I don’t care how “mainstream”[1] they are, it just has to be “good
enough”, small, simple, text terminal oriented… and with Ruby
support :slight_smile:

Martin

[1] as long as it simply does e.g “alt-w” for file write or "alt-d"
for delete line and “alt-m” for marking I’m fine - I’m somehow resistant
to step up (to e.g. vim) and do more complex keycombos/modes

I am still using the old glimmer, I created my own ruby
syntax-highlightning file.

It seems to have some conflicts with gtk-2.

···

Features*

* Multiple file loading.
* New/Open/Save/Save As
* Cut/Copy/Paste
* Multiple level Undo/Redo
* Tear Away windows (any file may be torn away from the main window).
* Custom color selections.
* Custom font selections. (Normal, Italic, Bold, Bold-Italic)
* File, Edit, Highlight, Find, Line Number, and Command toolbars.
* Background pixmap for editing window.
* File information: Current line, total lines, current byte, total
  bytes, ascii value of current byte.
* Find/Replace/Replace All, including in multiple files.
* Insert many common text segments, including: ChangeLog entry, GPL,
  Date, Time, etc.
* Gnome session management compliant.
* Save the state of the program to a "Session" file for editing
  groups of files.
* Python scripting support. Make macros and file filtering scripts,
  as well as custom menu entries!
* Bracket Matching
* Scriptable hooks for several events including enter-pressed and
  tab-pressed.
* Highlighting support for: Ada, Bash/Sh, C/C++, DTML, HTML, Java,
  Latex, GNU Make, Object Caml, Perl, PHP, PO (Language
  Translation), Python, Lisp (guile, scheme, etc), SGML, SQL,
  Tcl/Tk, WML, XML, and Z80 Assembly
* Printing support via gnome-print

Martin Pirker wrote:

Hi…

short question: is there somewhere a comprehensive list of Ruby
syntax-highlightning capable text editors (on Linux)?

I don’t care how “mainstream”[1] they are, it just has to be “good
enough”, small, simple, text terminal oriented… and with Ruby
support :slight_smile:

Martin

[1] as long as it simply does e.g “alt-w” for file write or “alt-d”
for delete line and “alt-m” for marking I’m fine - I’m somehow resistant
to step up (to e.g. vim) and do more complex keycombos/modes

Martin Pirker wrote:

short question: is there somewhere a comprehensive list of Ruby
syntax-highlightning capable text editors (on Linux)?

I don’t care how “mainstream”[1] they are, it just has to be “good
enough”, small, simple, text terminal oriented… and with Ruby
support :slight_smile:

C’mon… try Emacs/XEmacs… You know you want to…

By default it doesn’t have the bindings you want, but it is easy to set:

Start it up, hit alt-x, type “global-set-key”, hit enter, it will prompt
you for the key sequence, simply type the key-combo you want. For file
write the command you want is “write-file”, for delete line it is
kill-line. As for marking… I don’t know exactly what you mean.

Now ruby syntax highlighting may not be installed by default, though I
think it was for me on RedHat 9 (I installed every Ruby package I could).

If you aren’t completely tied to alt-w and alt-d, however, I’d recommend
you keep the default emacs key bindings.
Ctrl-K = kill-line
Ctrl-W = write-file
Alt-W = copy-region
Alt-D = kill-word

P.S. Who, besides me, thinks Emacs/XEmacs is a fine and dandy IDE for
doing Ruby development? I looked at FreeRIDE a while ago and from what
I could tell it didn’t offer nearly what the Emacsen did. Are there
other IDE features it doesn’t offer?

Ben

Kate has very good Ruby syntax highlighting and is a pretty good
all-around editor.

···

On Fri, 15 Aug 2003 20:36:42 +0000, Martin Pirker wrote:

Hi…

short question: is there somewhere a comprehensive list of Ruby
syntax-highlightning capable text editors (on Linux)?

> text terminal oriented... and with Ruby

Yes, I noted the text terminal qualification. But I still like Scite
and Nedit.

···

On Sat, 16 Aug 2003 05:53:51 +0900 Martin Pirker crf@sbox.tu-graz.ac.rtggrtgrtggegewferref.at wrote:

http://rubyforge.org/projects/aeditor/

···

On Sat, 2003-08-16 at 08:53, Martin Pirker wrote:

Hi…

short question: is there somewhere a comprehensive list of Ruby
syntax-highlightning capable text editors (on Linux)?

I don’t care how “mainstream”[1] they are, it just has to be “good
enough”, small, simple, text terminal oriented… and with Ruby
support :slight_smile:

Martin

[1] as long as it simply does e.g “alt-w” for file write or “alt-d”
for delete line and “alt-m” for marking I’m fine - I’m somehow resistant
to step up (to e.g. vim) and do more complex keycombos/modes

Please add any you find missing.

martin

···

Martin Pirker crf@sbox.tu-graz.ac.rtggrtgrtggegewferref.at wrote:

Hi…

short question: is there somewhere a comprehensive list of Ruby
syntax-highlightning capable text editors (on Linux)?

From memmory: Vim, Emacs, Anjuta (www.anjuta.org), and Kate.

···

On Sat, Aug 16, 2003 at 07:34:02AM +0900, Tim Hunter wrote:

On Fri, 15 Aug 2003 20:36:42 +0000, Martin Pirker wrote:

Hi…

short question: is there somewhere a comprehensive list of Ruby
syntax-highlightning capable text editors (on Linux)?

Kate has very good Ruby syntax highlighting and is a pretty good
all-around editor.


Daniel Carrera, Math PhD student at UMD. PGP KeyID: 9AF77A88
.-“~~~”-. On the menu of a Swiss restaurant:
/ O O \ “Our wines leave you nothing to hope for”
: s :
\ _/ / Sign outside a Hong Kong tailor shop:
`-.
_.-’ “Ladies may have a fit upstairs”

No, I don’t think he wants to… life is too short :slight_smile:

I am a reasonably competent programmer. I used to know the entire 6800 and
6502 instruction sets in hex. But I could never get my head around Emacs;
ctrl-this, meta-that, shift-ctrl-alt-the-other is just too much to cope
with, and distracts me from the job at hand, namely writing stuff. Hell,
last time I tried, I couldn’t even exit Emacs without going into another
shell and doing ‘ps’ and ‘kill’.

FWIW, my preferred editor is ‘joe’. It doesn’t do syntax highlighting (never
found the need). But it’s very fast, intuitive (by which I mean typing ‘d’
inserts a letter ‘d’ into the document, and hitting backspace deletes the
character to the left!) and the cursor and page keys work properly.

Sure, the editing commands have prefixes, but they’re Wordstar-like and
consistent: for programming you will get away with knowing just

^K X exit and save
^K Q exit without save (or just ^C)

^K B start of block
^K K end of block
^K C copy block
^K M move block

^K L jump to line number
^K F find or find and replace (^L = find again)

i.e. one modifier prefix I can cope with. But you don’t need to remember
them, since ^K H toggles a help window at the top of the screen, and you
don’t even have to remember that because it’s displayed in the title bar :slight_smile:

Then you pick up a few extra useful keys as you go along:

^Y delete line
^A start of line
^E end of line
^_ undo
^K R insert file at cursor point
^K W write block to file
^T toggle modes (e.g. insert/overwrite, line wrap)

I occasionally use the multi-file capability to move chunks of code between
files, and macros to do the same operation repeatedly, but that’s about all
I need. The majority of my brain is engaged in productive things, not
working out how to drive the damned editor.

Now, I guess once I’ve written that all out, it looks like I have learned
a bunch of control-sequences (15 in total). But you don’t have to learn any
to start using it productively, and you don’t need to keep referring to a
reference book.

Actually that’s the other thing about emacs - would I be right in saying the
documentation is in ‘GNU info’ format? The world did not need HTML
reinventing, nor a browser with yet another set of keystrokes to learn!

Cheers,

Brian.

···

On Sat, Aug 16, 2003 at 06:10:04AM +0900, Ben Giddings wrote:

Martin Pirker wrote:

short question: is there somewhere a comprehensive list of Ruby
syntax-highlightning capable text editors (on Linux)?

I don’t care how “mainstream”[1] they are, it just has to be “good
enough”, small, simple, text terminal oriented… and with Ruby
support :slight_smile:

C’mon… try Emacs/XEmacs… You know you want to…

Saluton!

  • Ben Giddings; 2003-08-15, 21:38 UTC:

I don’t care how “mainstream”[1] they are, it just has to be “good
enough”, small, simple, text terminal oriented…
^^^^^ ^^^^^^
C’mon… try Emacs/XEmacs… You know you want to…
^^^^^^^^^^^^

Seemingly only the OS recommendation came through while the
recommendation of the editor was lost. Restoration from morphogenetic
field resulted in:

After booting /boot/vmemaz open an eshell and run nano.

Gis,

Josef ‘Jupp’ Schugt

···


N’attribuez jamais à la malice ce que l’incompétence explique !
– Napoléon

Ben Giddings wrote:

Martin Pirker wrote:

short question: is there somewhere a comprehensive list of Ruby
syntax-highlightning capable text editors (on Linux)?

I don’t care how “mainstream”[1] they are, it just has to be “good
enough”, small, simple, text terminal oriented… and with Ruby
support :slight_smile:

C’mon… try Emacs/XEmacs… You know you want to…

I’m using XEmacs for Ruby editing, but it seems that I can’t get the
syntax highlighting to work. I have installed ruby-mode, but only
comments and strings are colored. Shouldn’t there be different colors
for variables, methods, classes etc?

Andreas

···


AVR-Tutorial, über 350 Links
Forum für AVRGCC und MSPGCC
http://www.mikrocontroller.net

that’s what I was looking for

thanks to all of you with your suggestions - however I didn’t want to
start another editor war :slight_smile:

after a quick review round I think I have a better “dream editor”
approximation on the graphical side, on the text terminal side I’ll just
stay with the old horse (zed) for now

Martin

···

Martin DeMello martindemello@yahoo.com wrote:

http://www.rubygarden.org/ruby?EditorExtensions

Kate has very good Ruby syntax highlighting and is a pretty good
all-around editor.

From memmory: Vim, Emacs, Anjuta (www.anjuta.org), and Kate.

Ofcourse, there’s also FreeRide:
http://freeride.rubyforge.org/wiki/wiki.pl

···


Daniel Carrera, Math PhD student at UMD. PGP KeyID: 9AF77A88
.-“~~~”-. On the menu of a Swiss restaurant:
/ O O \ “Our wines leave you nothing to hope for”
: s :
\ _/ / Sign outside a Hong Kong tailor shop:
`-.
_.-’ “Ladies may have a fit upstairs”

Daniel Carrera wrote:

Hi…

short question: is there somewhere a comprehensive list of Ruby
syntax-highlightning capable text editors (on Linux)?

Kate has very good Ruby syntax highlighting and is a pretty good
all-around editor.

From memmory: Vim, Emacs, Anjuta (www.anjuta.org), and Kate.

You might look at jEdit as well (www.jedit.org).

The only thing I don’t like is that do/end/etc. aren’t recognized for
auto-indenting (I was poking
around trying to change this, but it’s pretty much impossible without
rewriting core code).

It’s pretty good over all, though.

  • Dan
···

On Sat, Aug 16, 2003 at 07:34:02AM +0900, Tim Hunter wrote:

On Fri, 15 Aug 2003 20:36:42 +0000, Martin Pirker wrote:

Scripsit ille »Brian Candler« B.Candler@pobox.com:
[…]

Actually that’s the other thing about emacs - would I be right in saying the
documentation is in ‘GNU info’ format? The world did not need HTML
reinventing,

info works even without a browser. Use zless (vi-like keystrokes).

nor a browser with yet another set of keystrokes to learn!

I don’t use Emacs, but… doesn’t it have “info” Emacs-like keytrokes? It
at least quits on C-x C-c and has Emacs-like cursor motion. That’s why I
don’t use “info” - it would be a chicken-egg-problem.

But there’s a solution: pinfo.

···


For the sake of who I am, I am myself. [EoE Part II, translated]

Scripsit ille »Andreas Schwarz« usenet@andreas-s.net:

Ben Giddings wrote:

Martin Pirker wrote:

short question: is there somewhere a comprehensive list of Ruby
syntax-highlightning capable text editors (on Linux)?

I don’t care how “mainstream”[1] they are, it just has to be “good
enough”, small, simple, text terminal oriented… and with Ruby
support :slight_smile:

C’mon… try Emacs/XEmacs… You know you want to…

I’m using XEmacs for Ruby editing, but it seems that I can’t get the
syntax highlighting to work. I have installed ruby-mode, but only
comments and strings are colored. Shouldn’t there be different colors
for variables, methods, classes etc?

I’m using elvis and vim.

elvis doesn’t have ANY Ruby syntax highlighting and vim’s doesn’t work in
the case

def foo()
return if true
23
else
42
end
end

The last end isn’t colored, as if there were an end too much. Workaround:
use the ternary operator instead of if in expressions.

For vi and clones, I use this set of macros: (WARNING, contains some
special characters):

" .exrc
set shiftwidth=2
set ai
map! ,. (?)
map! , e/,.
5s
map , i,
map! ,- edd^i
map! ,+ e-$o
" additional Ruby bindings
map! ,b { |,.|
,.
}
,.e3-,
map! ,c case ,.
,.
end
,.e3-,
map! ,d do |,.|
,.
end
,.e3-,
map! ,e else

map! ,E elsif ,.
,.e1-,
map! ,i if ,.
,.
end
,.e3-,
map! ,l loop do ,.
,.
end
,.e3-,
map! ,t when ,. then ,.e^,
map! ,w while ,.
,.
end
,.e3-,
map! ,D def ,.
,.
end
,.e3-,
map! ,C class ,.
def initialize(,.)
,.
end
,.
end
,.e6-,
map! ,M module ,.
,.
end
,.e3-,
""elvis map ,r :split !ri
""elvis map ,x :split !ruby %
""vim set filetype=ruby

,. inserts a marker (I use (?) because it’s compatible even to a
normal vi [doen’t contain any non-ASCII characters]) and , jumps to
the next marker.

The above code was written using:

,Dfoo(),return ,itrue,23
,e42,-,

The return before the ,e could be optimized away, but I don’t feel like
it because I want the keywords to be inserted in the same line as I am
invoking the macro from.

···


The math could be slightly incorrect, but it sounds right. RFC 2795

Sure, the editing commands have prefixes, but they’re Wordstar-like and
consistent: for programming you will get away with knowing just

^K X exit and save
^K Q exit without save (or just ^C)

In Emacs

Ctrl-X Ctrl-C (it will prompt you about whether to save or not)

^K B start of block

Ctrl-Space

^K K end of block

Just move the point (cursor).

^K C copy block

Meta-W

^K M move block

Paste (Yank)
Ctrl-Y

^K L jump to line number

In XEmacs at least:
Meta-G

^K F find or find and replace (^L = find again)

In Emacs, incremental search is Ctrl-S,

Interactive search and replace is a bit more complex:
Ctrl-Meta-%

^Y delete line
Ctrl-K

^A start of line
Emacs is the same

^E end of line
Ditto

^_ undo
Ditto

^K R insert file at cursor point
Hmm, not sure if this is bound by default

^K W write block to file
Ctrl-X Ctrl-W to write to a file in emacs, write a block to a file?
Hrm…

^T toggle modes (e.g. insert/overwrite, line wrap)
Modes in Emacs are a bit more complex.

In modern versions of the GUI Emacsen you can use the menu and mouse
for most of these, and the shortcut keys are listed in the menu. In
addition, if you hit Meta-X, you can enter any command name, and if you
hit “tab” while you’re starting to type a command name, you can see the
various potential commands.

Unless you use the menus, Emacs can be difficult at first, but
considering how many hours a day I spend using an editor, I don’t mind
a bit of extra time learning in exchange for an editor as flexible as
Emacs.

I occasionally use the multi-file capability to move chunks of code
between
files, and macros to do the same operation repeatedly, but that’s
about all
I need. The majority of my brain is engaged in productive things, not
working out how to drive the damned editor.

Within a short time I got used to Emacs and my brain was busy thinking
while my fingers did their thing. The cool thing with Emacs is that
although I learned enough to use it as a simple editor within a few
days, years later there are still things I’m learning that speed up my
productivity. For example, just recently I figured out how to properly
do regular-expression-search-and-replace.

Actually that’s the other thing about emacs - would I be right in
saying the
documentation is in ‘GNU info’ format? The world did not need HTML
reinventing, nor a browser with yet another set of keystrokes to learn!

Yeah, info format sucks. I just use the online HTML manual.

Btw, most Apple OS X applications have the basic Emacs key bindings, so
if you ever use OS X, you can kill 2 birds with one stone.

Ben

···

On Saturday, August 16, 2003, at 03:55 AM, Brian Candler wrote:

Hmm, it works for me. If you can’t get it working we can talk offline
about things, but yea, there are a whole lot of syntax things that are
highlighted for me. Strings, keywords, classes, constants, comments,
instance vars, #{} sequences, function definitions, regular
expressions…

Ben

···

On Saturday, August 16, 2003, at 09:15 AM, Andreas Schwarz wrote:

I’m using XEmacs for Ruby editing, but it seems that I can’t get the
syntax highlighting to work. I have installed ruby-mode, but only
comments and strings are colored. Shouldn’t there be different colors
for variables, methods, classes etc?

[nit-picking]
well, in this case Ruby thinks like vim :slight_smile:

batsman@tux-chan:/tmp$ expand -t4 t.rb
def foo()
return if true
23
else
42
end
end

p foo
batsman@tux-chan:/tmp$ ruby t.rb
t.rb:6: warning: else without rescue is useless
t.rb:7: syntax error

However
a = if true
1
else
2
end
fails as you describe.

···

On Sat, Aug 16, 2003 at 10:55:41PM +0900, Rudolf Polzer wrote:

Scripsit ille »Andreas Schwarz« usenet@andreas-s.net:

Ben Giddings wrote:

Martin Pirker wrote:

short question: is there somewhere a comprehensive list of Ruby
syntax-highlightning capable text editors (on Linux)?

I don’t care how “mainstream”[1] they are, it just has to be “good
enough”, small, simple, text terminal oriented… and with Ruby
support :slight_smile:

C’mon… try Emacs/XEmacs… You know you want to…

I’m using XEmacs for Ruby editing, but it seems that I can’t get the
syntax highlighting to work. I have installed ruby-mode, but only
comments and strings are colored. Shouldn’t there be different colors
for variables, methods, classes etc?

I’m using elvis and vim.

elvis doesn’t have ANY Ruby syntax highlighting and vim’s doesn’t work in
the case

def foo()
return if true
23
else
42
end
end


_ _

__ __ | | ___ _ __ ___ __ _ _ __
'_ \ / | __/ __| '_ _ \ / ` | ’ \
) | (| | |
__ \ | | | | | (| | | | |
.__/ _,
|_|/| || ||_,|| |_|
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

Beeping is cute, if you are in the office :wink:
– Alan Cox

Scripsit ille ?Brian Candler? B.Candler@pobox.com:
[…]

Actually that’s the other thing about emacs - would I be right in saying the
documentation is in ‘GNU info’ format? The world did not need HTML
reinventing,

info works even without a browser. Use zless (vi-like keystrokes).

Sure, it’s marked-up text and can be read directly. (You can read manpage
nroff source as well if you like, but I choose not to :slight_smile:

nor a browser with yet another set of keystrokes to learn!

I don’t use Emacs, but… doesn’t it have “info” Emacs-like keytrokes? It
at least quits on C-x C-c and has Emacs-like cursor motion. That’s why I
don’t use “info” - it would be a chicken-egg-problem.

Yes, very true. On my machine, if you type “info” then hit backspace (which
being ctrl-h it interprets as “help” of course) you get a 429-line long
listing of keystrokes - just for an info browser! But there’s lot of C-this
and M-that and ESC-ESC-other which does look like it’s based on emacs.

But there’s a solution: pinfo.

I hadn’t seen that (just installed it now - it’s pretty good). If I could
reformat info docs as HTML though, then I could browse them with lynx or any
other browser of my choice. Now that would be nice.

Cheers,

Brian.

···

On Sat, Aug 16, 2003 at 08:35:23PM +0900, Rudolf Polzer wrote: