Editing Ruby using UltraEdit

January 22, 2008

I’ve long been a user of UltraEdit for writing scripts where there’s no particularly good language-specific IDE (and by good I mean responsive and with features that don’t get in your way, rather than overloaded with features but slow as a result).

Writing Perl scripts in UltraEdit is made easier with syntax highlighting and the ability to hook the command line into UltraEdit so that I can quickly perform syntax-checking.

As I’m in the process of learning Ruby, I thought I’d set UltraEdit up in a similar fashion, so that I can enjoy the same features while writing Ruby scripts. It’s easy as:

  1. Setting the tool configuration to do the syntax checking:
    UltraEdit Ruby Configuration
  2. Add the following contents into the UltraEdit C:\Program Files\UltraEdit\WORDFILE.TXT:

/L10"Ruby" Line Comment Num = 2# Block Comment On = =begin Block Comment Off = =end String Chars='" Escape Char = \ File Extensions = rb rbw
/Indent Strings = "do" "begin" "{" "|"
/Unindent Strings = "}" "end"
/Delimiters = ~^[]{}()<>.,+ *|/' "
/Function String = "%[ ^t]++^(module[ ^t]+[a-z0-9_.]+^)[ ^p^r^n]"
/Function String 1 = "%[ ^t]++^(class[ ^t]+[a-z0-9_.]+^)[ ^p^r^n]"
/Function String 2 = "%[ ^t]++^(def[ ^t]+[a-z0-9_.]+^)[ ^p^r^n(]"
/C1"Ruby Keywords"
(
)
#
#{
{
}
__FILE__ __LINE__
alias and
begin break
case class
def defined? do
else elsif end ensure
false for
if in
module
next nil not
or
quit
redo rescue retry return
self super
then true
undef unless until
when while
yield
BEGIN
END
/C2"Ruby Classes/Exceptions"
`
ArgumentError Array
Bignum Binding
Class Complex ConditionVariable Continuation
DelegateClass Dir
English EOFError Errno::ENOENT Errno::EPERM Exception
FalseClass Fatal File File::Stat Fixnum Float FloatDomainError
GetoptLong
Hash
IndexError Integer Interrupt IO IOError
LoadError LocalJumpError
MatchData Method Module Mutex
NameError NilClass NoMemoryError NotImplementedError Numeric
Object
Proc Pstore
Range RangeError Regexp RegexpError RuntimeError
ScriptError SecurityError SimpleDelegator Singleton StandardError String
Struct Struct::Tms Symbol
SyntaxError SystemCallError SystemExit SystemStackError
Tempfile Thread ThreadGroup Time TrueClass TypeError
WeakRef
ZeroDivisionError
/C3"Ruby Libraries/Modules"
mkmf
win32api win32ole
BasicSocket Benchmark
CGI Comparable Config CONFIG
DATA Date
Enumerable Errno
FALSE FileTest Find FTP
GC
HTTP HTTPResponse
IPSocket
Kernel
Marshal
Math
NET Net::FTP Net::HTTP Net::HTTPResponse Net::POP Net::APOP Net::POPMail
Net::SMTP Net::Telnet NIL
ObjectSpace
Observable
ParseDate POP POPMail Process
Session SMTP Socket SOCKSSocket Stat STDERR STDIN STDOUT
TCPServer TCPSocket Telnet Tms TOPLEVEL_BINDING TRUE
UDPSocket UNIXServer UNIXSocket
Win32API WIN32OLE WIN32OLE_EVENT
/C4"Ruby Constants/Strings"
"
cutime cstime
domain
expires
secure stime
AF_APPLETALK AF_AX25 AF_INET6 AF_INET AF_IPX AF_UNIX AF_UNSPEC
AI_ALL AI_CANONNAME AI_MASK AI_NUMERICHOST AI_PASSIVE AI_V4MAPPED_CFG
ARGF ARGV
Complex::I
Default
E EXTENDED
EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY
EAI_MAX EAI_MEMORY
EAI_NODATA EAI_NONAME EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM
FTP_PORT
IGNORECASE
IP_ADD_MEMBERSHIP IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL
IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL
LOOKUP_INET6 LOOKUP_INET LOOKUP_UNSPEC
MSG_DONTROUTE MSG_OOB MSG_PEEK
MULTILINE
PF_APPLETALK PF_AX25 PF_INET6 PF_INET PF_IPX PF_UNIX PF_UNSPEC
PI PLATFORM PRIO_PGRP PRIO_PROCESS PRIO_USER
RUBY_PLATFORM RUBY_RELEASE_DATE RUBY_VERSION
SOCK_DGRAM SOCK_PACKET SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM
SOL_ATALK SOL_AX25 SOL_IPX SOL_IP SOL_SOCKET SOL_TCP SOL_UDP
SOPRI_BACKGROUND SOPRI_INTERACTIVE SOPRI_NORMAL
SO_BROADCAST SO_DEBUG SO_DONTROUTE SO_ERROR SO_KEEPALIVE SO_LINGER
SO_NO_CHECK SO_OOBINLINE SO_PRIORITY SO_RCVBUF SO_REUSEADDR SO_SNDBUF
SO_TYPE
TCP_MAXSEG TCP_NODELAY
WIN32OLE::VERSION WNOHANG WUNTRACED
/C5"Ruby Methods"
. .. ...
! !=
~
% %= %q %w %Q %W
@
& && &=
* ** *= **=
+ += +@
- -= -@
> >= >> >>=
< <= <<= <> << <=>
= == === => =~
[ []=
]
| || |= ||=
^ ^=
::
// /= /
_id2ref __id__ __send__
abort abort_on_exception abort_on_exception! abs abs2 add alias_method
alive? ancestors
append_features arg arity asctime assoc at atan2 atime
attr attr_accessor attr_reader attr_writer at_exit autoload
backtrace basename between? binding binmode blksize blockdev? block_given?
blocks
broadcast
call callcc caller capitalize capitalize! casefold? catch ceil center chomp
chomp! chop chop!
chardev? chr chdir chmod chown chroot class_eval class_variables clear clone
close closed? close_read close_write cmp coerce collect collect!
compact compact! compare compile concat conjugate
const_defined? const_get const_set constants copy cp cos count
create_makefile critical critical= crypt ctime current
day default default= define_finalizer delete delete! delete_at delete_if
detect dev
directory? dirname dir_config disable display divmod downcase downcase!
downto dump dup
each each_byte each_index each_key each_line each_object each_pair
each_with_index
egid egid= empty? enable england entries
eof eof? eql? equal? error? error_message escape euid euid= eval exception
exclude_end?
exec executable? executable_real?
exist? exist2? existw? exit exit! exp expand_path extend extend_object
fail fcntl fetch file? fileno fill find find_all find_library finite? first
flatten flatten!
flock flush foreach fork format freeze frexp frozen? ftype
garbage_collect get getc getogrp getpriority gets getwd get_option
gid gid= glob global_variables
gm gmt? gmtime gregorian gregorian_leap? grep grpowned? gsub gsub!
has_key? has_value? hash have_func have_header have_library hex hour
id id2name image include include? included_modules index indexes indices
inherited initialize integer? iterator?
intern ino inspect install
instance_eval instance_methods instance_of? instance_variables ioctl is_a?
isatty isdst italy
jd join julian julian_leap?
kcode key? keys kill kind_of?
lambda last last_match ldexp leap? length lineno lineno= link list ljust
load local local_variables
localtime lock locked? log log10 loop lstat
main makedirs makepath map map! match max mday member? members message
method
method_added method_defined? method_missing methods min mjd
mkdir mktime mode module_eval module_function modulo mon month move mv mtime
name nan? nesting new new1 new2 new3 newsg neww next! nil? nitems nlink
nonzero? now ns?
oct open ordering ordering= os? owned?
p pack parsedate pass path pid pipe pipe? polar pop popen pos pos= ppid
print printf priority priority=
private private_methods proc protected protected_methods prune
public_methods
private_class_method private_instance_methods protected_instance_methods
public_class_method public_instance_methods
public push putc puts pwd
quiet quiet= quiet? quote
raise rand rassoc reject! read readable? readable_real?
readchar readline readlines readlink real rehash reject reject!
remainder remove_const remove_method rename reopen replace require
respond_to? restore reverse reverse! reverse_each rewind rdev rindex rjust
rmdir
rm_f round run
safe_level safe_unlink scan sec seek select send setgid? setpgid setpgrp
setpriority
setsid setuid? set_backtrace set_options set_trace_func sg
shift signal sin singleton_methods singleton_method_added size size? sleep
slice slice! socket? sort sort! source split sprintf squeeze squeeze! sqrt
srand start
stat status step sticky? stop stop? store strftime strip strip! sub sub!
succ succ! superclass
symlink symlink? sync synchronize sync= syscall syscopy sysread system
syswrite swapcase swapcase!
taint tainted? tell terminate test throw timeout times today to_a to_ary
to_f to_i
to_io to_proc to_r to_s to_str tr tr! trace_var trap try_lock tr_s tr_s!
truncate tty? tv_sec tv_usec type
uid uid= umask undef_method ungetc uniq uniq! unlink unlock unpack unshift
untaint untrace_var
upcase upcase! update upto usec utc utc? utime
value? values var
wait wait2 waitpid waitpid2 wakeup wday weakref_alive? write writable?
writable_real?
yday year
zero? zone
Comparisons
/C6"Ruby Library Methods"
a accept addr add_observer all
base bind binmode= blockquote
caption changed changed? checkbox checkbox_group cmd code const_load
content_type cookies connect count_observers
debug_mode debug_mode= delete_observer delete_observers
dir do_not_reverse_lookup do_not_reverse_lookup=
escapeElement escapeHTML
file_field form for_fd
getaddress getaddrinfo getbinaryfile gethostbyaddr gethostbyname gethostname
getnameinfo getservbyname getpeername getsockname getsockopt gettextfile
head header hidden html
img img_button invoke
lastresp listen local_path login lookup_order lookup_order= ls
mails message_loop multipart_form
notify_observers
on_event original_filename out
pair params parse passive passive= password_field peeraddr popup_menu port
post pretty
putbinaryfile puttextfile
radio_button radio_groupready recv recvfrom reset resume resume=
retrbinary retrlinew return_code rfc1123_date
scrolling_list sendmail setsockopt shutdown socketpair storbinary storlines
submit
telnetmode telnetmode= text_field textarea top
uidl unescape unescapeElement unescapeHTML
waitfor welcome
Call
/C7"Block-to-Proc Variable/Instance Variable/Class Variable"
** &a &b &c &d &e &f &g &h &i &j &k &l &m &n &o &p &q &r &s &t &u &v &w &x &y &z
** @a @b @c @d @e @f @g @h @i @j @k @l @m @n @o @p @q @r @s @t @u @v @w @x
@y @z @@a @@b @@c @@d @@e @@f @@g @@h @@i @@j @@k @@l @@m @@n @@o @@p @@q @@r
@@s @@t @@u @@v @@w @@x @@y @@z
/C8"Constant/Global/Symbol"
** A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
** $
** :

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: