SciTE is a Scintilla-based Text Editor written for Windows and Linux/UN*X. It is included in some versions of Ruby.
After Ruby has been installed using the One-Click Installer , SciTE is installed (by default) in C:\Ruby\Scite. Here are some tips for using SciTE on Windows.
Create a file named
scite.bat in your
C:\Windows directory containing the lines:
START c:\ruby\scite\scite.exe "%1"
This will allow you to type
e myfile or
scite myfile on the command line to open up the file
myfile for editing.
This section contains some useful abbreviations that can be added to the
rea=redirect_to :action => "|" rec=redirect_to :controller => "|" lic=<%= link_to "|", :controller => "" %> lia=<%= link_to "|", :action => "" %>
Anyone who has syntax hilighting for rhtml/rjs files? Please :-)
To the file .SciTEUser.properties in your home directory, add the following:
command.name.3.$(file.patterns.rb)=beautify command.3.$(file.patterns.rb)=/usr/local/bin/rbeautify.rb $(FilePath) command.is.filter.3.$(file.patterns.rb)=1
This adds a command ctrl-3 to “pretty print” your ruby source code. This is very useful to keep your code nicely formatted. You will need rbeautify.rb , an executable shell script in your path. You can find rbeautify.rb
Be sure rbeautfiy.rb is in your path and is executable and that the first line of rbeautify.rb is pointing to ruby.
Also be sure you have ruby.properties in your scite directory which is found at:
/sw/share (Mac OS X with Fink Linux)
Also see this excellent article:
ruby.properties is installed when you install scite (I believe).
Regards, John Rothfield
Civ2boss, 07/27/06, 12:42 AM
Thanks John, very nice pretty print tool, Mancy
Tip on (almost) TextMate style file management using SciTe and Windows explorer.
Associate .rb, .irb, and if you want .yml and .log files with SciTe using explorer Tools>Folder Options>File Types or the following commands:
ftype RB="<your SciTe path>" ftype IRB="<your SciTe path>" ftype YML="<your SciTe path>" ftype LOG="<your SciTe path>" assoc .rb=RB assoc .irb=IRB assoc .yml=YML assoc .log=LOG
In the SciTe options file of your preference (global, local or user) add the following line:
This will reuse existing SciTe session when files are opened directly in explorer or from the command line.
Launch explorer from the Run box or command line using the following command:
explorer /root,<your rails app root>e.g.
explorer /root,“C:\My Rails Apps\google_killer”
This will launch explorer with your app directory as the root folder.
In explorer hide all toolbars and explorer bars via View menu and show the Folders explorer bar. This will allow you to use the Tab key to quickly switch between the Folders bar and the file list.
From here on you can Alt-Tab between SciTe and explorer. When in explorer, if necessary, hit Tab twice to switch focus to Folders bar and start typing directory name like “models”, and once models directory is highlighted, hit tab and start typing the filename you need. Another trick is to expand all commonly used directories in Folders view, thus allowing direct jump to a subdirectory by typing it’s name.
You can now focus more on your app and less on Mac/TextMate fantasies.