SciTE Ruby Lexer

K

Kaspar Schiess

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

G'day fellow Rubyists,

I am currently rewriting the Scintilla Ruby Lexer and Folder code from
scratch. A code snapshot of today is available from
http://www.tua.ch/ruby > Current (source code and windows binaries of
SciTE with new lexer).

I would like folding and highlighting to be as Ruby-like as possible.
However, I need your help for this: Is there anything that bugs you
SciTE users about your editor in connection to Ruby ? Flood me with
suggestions; I am keeping a todo list here.

- --
kaspar

semantics & semiotics
code manufacture

www.tua.ch/ruby
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAkiaNFifl4CA0ImQRAv7TAJ9GJct1v0Q7aEWf7KQOWT48TYKVZgCghFhP
rEtBEkdlU+RDBUhJj23rX+M=
=kpBz
-----END PGP SIGNATURE-----
 
S

Simon Strandgaard

Kaspar Schiess said:
I am currently rewriting the Scintilla Ruby Lexer and Folder code from
scratch. A code snapshot of today is available from
http://www.tua.ch/ruby > Current (source code and windows binaries of
SciTE with new lexer).

I would like folding and highlighting to be as Ruby-like as possible.
However, I need your help for this: Is there anything that bugs you
SciTE users about your editor in connection to Ruby ? Flood me with
suggestions; I am keeping a todo list here.

I don't know if this will help you. I took a brief look at your LexRuby.cxx
but realized that I am not into Scintillas lexing system.

You may find inspiration by looking at the syntax coloring code I have
made (entirely in Ruby).
http://neoneye.dk/syntax.html

BTW: your tar.gz file didn't have a top dir, which may mess other peoples
unpack directory up. I suggest you fix it.
 
K

Kaspar Schiess

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

| I don't know if this will help you. I took a brief look at your
LexRuby.cxx
| but realized that I am not into Scintillas lexing system.
..I wasn't either. ;)

| You may find inspiration by looking at the syntax coloring code I have
| made (entirely in Ruby).
| http://neoneye.dk/syntax.html
Thank you, I certainly will.

| BTW: your tar.gz file didn't have a top dir, which may mess other peoples
| unpack directory up. I suggest you fix it.
I have changed that. Sorry for messing up your dl directory and probably
others.


- --
kaspar

semantics & semiotics
code manufacture

www.tua.ch/ruby
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAki9nFifl4CA0ImQRAusMAJ44CyLaepFr/x+J4TC+LTICZTEVRwCglHx7
OFmEAeN+jAfsCE1+k210ZPA=
=cn0X
-----END PGP SIGNATURE-----
 
S

Simon Strandgaard

Kaspar Schiess said:
| BTW: your tar.gz file didn't have a top dir, which may mess other peoples
| unpack directory up. I suggest you fix it.
I have changed that. Sorry for messing up your dl directory and probably
others.

Don't worry, history has learned me to always make a dir for that tar.gz
I wish to untar, so no accident here.

IMHO its just good practice to make a top-dir :)
 
J

Jean-Hugues ROBERT

A short wish list, some may be outside "folding/highlighting'

(1)--------- Compact folds

The following:
==================
#A's are for doing
# this kind of stuff
-class A
- def f
stuff
end
end



-class B
def f;end
end
==================

When folded at class A should show:
==================
+class A
-------------

-class B
def f;end
end
==================
i.e. Fold should hide the corresponding 'end', excess whitespace/newlines
AFTER that end, and aligned comments and excess whitespace BEFORE before the
start. This should apply to all foldable constructs. The -/+ option that
appears today on "end" and serves to fold/unfold following whitespace and
comments is not useful, even counterintuitive.

(2)--------- Multiple buffers/files
Probably ignorance on my part. I have only been able to view one file/butter
at a time in a Scite window; so I have to open multiple Scite windows
instead. I would really like to be able to split the window (horizontally or
vertically) and see more than one buffer.

Try this:
Edit SciTE.properties
Add:
tabbar.visible=1
tabbar.multiline=1
If that does not work I can send you my SciTE.properties file, I do use
tabs and multiple buffers and I rarely open more than one Scite window.

Yours,

Jean-Hugues
 
K

Kaspar Schiess

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Its Me wrote:

| A short wish list, some may be outside "folding/highlighting'

Your whishes were:
a) Folding improovement:
Actually the old Ruby lexer and folder was just a Python lexer. Hence
the end does not fold. I will see to improoving that, but my first stage
was lexer improvement (nested strings).

b) Multiple Buffers:
This is a FAQ on the SciTE list ;) There is a way to do it, as was
posted elsewhere on this thread.

c) Debugger:
FreeRIDE includes one.. and will hopefully include my lexer, making it
the perfect IDE.. might even adopt using it.

Glad I can make it ;)


- --
kaspar

semantics & semiotics
code manufacture

www.tua.ch/ruby
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD4DBQFAksAPFifl4CA0ImQRAv/4AJdobbZEOSMeNSFP7SNtkLb+BKKvAKCBSYxs
Kll1eoaBH5+nIHEF6s9Gdg==
=NYSc
-----END PGP SIGNATURE-----
 
N

Neil Hodgson

Its Me:
(2)--------- Multiple buffers/files
Probably ignorance on my part. I have only been able to view one file/butter
at a time in a Scite window; so I have to open multiple Scite windows
instead. I would really like to be able to split the window (horizontally or
vertically) and see more than one buffer.

This is a fairly core restriction: while SciTE can have multiple files
loaded at once and can display tabs to switch between them, there is no way
to see the contents of more than one file at at time. I am unlikely to agree
to lifting this restriction as I want SciTE to remain simple. For more
complex tasks, a more featureful application would be a better fit. If
others wish to start a project that adds multiple views to an extended
version of SciTE then I'll try to help out so that they can continue to
benefit from enhancements to my version of SciTE.

For Ruby development, I feel you are much better off with an application
designed around the needs of Ruby including integration of debugging, use of
Ruby-compatible regular expressions, and an understanding of the files that
make up a Ruby project and the links between them. It would be a good idea
to develop such an application in a sensible high level language like Python
;-) rather than C++. FreeRIDE seems to be on the right track.

Neil
 
J

Josef 'Jupp' Schugt

Hi!

Simon said:
Don't worry, history has learned me to always make a dir for that tar.gz
I wish to untar, so no accident here.

IMHO its just good practice to make a top-dir :)

Using 'mc' hit F3 on any kind of supported archive to see if there
is a top-dir. FreeBSD does not install mc per default but it's in the
ports.

For an uncompressed tar archive

tar tf archive.tar|head -1

is sufficient to see if there is a top-dir (use 'tjf' for '.tar.bz2'
and 'txf' for '.tar.gz'). It should print something that ends in a
slash and looks similar to the archive name :->

Josef 'Jupp' Schugt
 
S

Simon Strandgaard

Josef 'Jupp' Schugt said:
Using 'mc' hit F3 on any kind of supported archive to see if there
is a top-dir. FreeBSD does not install mc per default but it's in the
ports.

For an uncompressed tar archive

tar tf archive.tar|head -1

is sufficient to see if there is a top-dir (use 'tjf' for '.tar.bz2'
and 'txf' for '.tar.gz'). It should print something that ends in a
slash and looks similar to the archive name :->


Its interesting to see how others deal with tar.gz files.

It would be nice if we had an 'utopia untar' which per default
ensured that the content got extracted into a top-dir. If the file
didn't got one, a top-dir was created.

Same senario with unzip.

Maybe if untar+unzip+unrar were combined and named unpack.

Does such tool exist?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top