SciTE properties

SciTE is like the Firefox of text editors – fast, cross platform, configurable, free / Open Source etc. with the bonus of giving a familiar environment on Linux and Windows, particularily where shortcuts are concerned.

If you’re used to editors like EditPlus or Ultra Edit on Windows, SciTE is at least as configurable (end of line chars, tabs / spaces etc.) and provides a source “tree view” allowing you to “collapse” functions / classes etc. plus has excellent code completion.

On Windows there are a number of pre-packaged installers – I tend to use this one (.exe) which is based on the latest SciTE CVS. On Linux, usually use a package geared for the distro, although compiling your own is no problem if GTK is available.

There’s also a companion Filerx (Windows only) which I don’t use but adds “project” related features.

Anyway – thought I’d dump my SciTEGlobal.properties file here, to make my life and anyone else’s easier. Configuration can be applied in a number of files, allowing a base configuration to be inherited while individual users can modify their own settings further. The easiest way to to edit your own is from menu “Options” > “Open Global Properties”

This configuration probably needs further tuning, particularily font-wise, but has the basics set up as I like them and is geared for PHP. If you use a “raw” build of SciTE you may need to get PHP related add-ons from here. Documentation of the settings in this configuration can be found here.


# Global initialisation file for SciTE
# For Linux, place in $prefix/share/scite
# For Windows, place in same directory as SciTE.EXE (or Sc1.EXE)
# Documentation at http://www.scintilla.org/SciTEDoc.html

# Globals

# Window sizes and visibility
if PLAT_WIN
position.left=0
position.top=0
if PLAT_GTK
position.left=5
position.top=22

position.width=576
position.height=740

position.tile=1
#full.screen.hides.menu=1
#minimize.to.tray=1
#split.vertical=1
#output.horizontal.size=200
#output.vertical.size=60
#horizontal.scrollbar=0
#horizontal.scroll.width=10000
#output.horizontal.scrollbar=0
#output.horizontal.scroll.width=10000
#output.scroll=0
#end.at.last.line=0
tabbar.visible=1
tabbar.hide.one=1
tabbar.multiline=1
#toolbar.visible=1
#undo.redo.lazy=1
statusbar.visible=1
#fileselector.width=800
#fileselector.height=600
#magnification=-1
#output.magnification=-1

# Sizes and visibility in edit pane
line.margin.visible=1
line.margin.width=4
margin.width=16
#fold.margin.width=16
#fold.margin.colour=#FF0000
#fold.margin.highlight.colour=#0000FF
blank.margin.left=4
#blank.margin.right=4
buffered.draw=1
#two.phase.draw=0
use.palette=0

# Element styles
#view.eol=1
#control.char.symbol=.
caret.period=500
view.whitespace=1
view.indentation.whitespace=1
view.indentation.guides=1
highlight.indentation.guides=1
caret.fore=#FF0000
caret.width=2
caret.line.back=#FFFED8
calltip.back=#FFF0FE
edge.column=200
edge.mode=0
edge.colour=#C0DCC0
braces.check=1
braces.sloppy=1
selection.fore=#006000
# DADADA used as background because it yields standard silver C0C0C0
# on low colour displays and a reasonable light grey on higher bit depths
selection.back=#DADADA
whitespace.fore=#FF0000
whitespace.back=#FFF0F0
#error.marker.fore=#0000A0
#error.marker.back=#DADAFF
#bookmark.fore=#808000
#bookmark.back=#FFFFA0
#use.monospaced=1

# Checking
are.you.sure=1
#are.you.sure.for.build=1
#quit.on.close.last=1
load.on.activate=1
#save.on.deactivate=1
are.you.sure.on.reload=1
reload.preserves.undo=1
#check.if.already.open=1
default.file.ext=.php
title.full.path=1
title.show.buffers=1
save.recent=1
save.session=1
open.dialog.in.file.directory=1
#strip.trailing.spaces=1
#ensure.final.line.end=1
#ensure.consistent.line.ends=1
#save.deletes.first=1
buffers=50
buffers.zorder.switching=1
#win95.death.delay=1000
#translation.missing=***
#read.only=1

# Indentation
tabsize=4
indent.size=4
use.tabs=0
indent.automatic=1
indent.opening=0
indent.closing=0
#tab.indents=0
#backspace.unindents=0
wrap=1
#cache.layout=3
#output.wrap=1
#output.cache.layout=3

# Folding
# enable folding, and show lines below when collapsed.
fold=1
fold.compact=1
fold.flags=16
fold.symbols=1
#fold.on.open=1

# Find and Replace
#escapes.in.find.replace=1
# findstr is available on recent versions of Windows including 2000
if PLAT_WIN
# find.command=findstr /n /s $(find.what) $(find.files)
find.command=grep --line-number "$(find.what)" $(find.files)
#find.input=$(find.what)
if PLAT_GTK
find.command=grep --line-number "$(find.what)" $(find.files)
find.files=*.c *.cxx *.h
#find.replace.matchcase=1
find.replace.escapes=1
#find.replace.regexp=1
#find.replace.regexp.posix=1
#find.replace.wrap=0
#find.replacewith.focus=0

# Behaviour
eol.mode=LF
#eol.auto=1
clear.before.execute=0
#vc.home.key=1
wrap.aware.home.end.keys=1
autocompleteword.automatic=1
autocomplete.choose.single=0
caret.policy.xslop=1
caret.policy.width=20
caret.policy.xstrict=0
caret.policy.xeven=0
caret.policy.xjumps=0
caret.policy.yslop=1
caret.policy.lines=1
caret.policy.ystrict=1
caret.policy.yeven=1
caret.policy.yjumps=0
#visible.policy.strict=1
#visible.policy.slop=1
#visible.policy.lines=4
#time.commands=1

# Status Bar
statusbar.number=4
statusbar.text.1=
li=$(LineNumber) co=$(ColumnNumber) $(OverType) ($(EOLMode)) $(FileAttr)
statusbar.text.2=
$(BufferLength) chars in $(NbOfLines) lines. Sel: $(SelLength) chars.
statusbar.text.3=
Now is: Date=$(CurrentDate) Time=$(CurrentTime)
statusbar.text.4=
$(FileNameExt) : $(FileDate)

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • http://webtech.lv kaklz

    I didn’t really play about it, but noticed a bad thing in syntax highlighter:

    die(‘Something’s wrong’);

    It highlights just the ‘Something’ part and then all the rest of highlighting goes crazy.

  • http://www.jeebers.com dereko

    yea but the major advantage of editplus is the ftp options… I can edit a file on any webserver I have quickly and easily wiht my favorite editor. SciTe seems to have some nice features but simple things like that make a big difference.

  • http://www.redcow.ca/ Ray Oliver

    Interesting, but where’s the Mac OS X version?

  • philipp

    Have you ever looked at jedit? Altough it’s not as small as scite, it runs pretty fast and it’s really cross platform (so there is a OS X version) and has a bunch of features I haven’t seen yet in other editors. You should give it a try.

  • http://www.phppatterns.com HarryF

    die(‘Something’s wrong’);

    It highlights just the ‘Something’ part and then all the rest of highlighting goes crazy.

    Isn’t that what you would expect to happen? Personally find it useful as you can spot syntax errors easily.

    yea but the major advantage of editplus is the ftp options… I can edit a file on any webserver I have quickly and easily wiht my favorite editor. SciTe seems to have some nice features but simple things like that make a big difference.

    I tend to do things differently but if you look in the Documentation, right at the end, there’s a section “How can I add [some external application] to the tools menu on SciTE?” which explains how to do this – you’d combine it with some external ftp client.

    but where’s the Mac OS X version?

    There’s some mention on the SciTE mailing lists about a port to OSX coming soon – presumably that means some kind of binary / installable version. Perhaps you could try to compile it yourself, in conjunction with GTK-OSX.

  • iansym

    I tried to use SciTE on many occasions because It was a bit fancier than NEdit (my previous editor of choice). I found that it’s Syntax Highlighting was flawed, as mentioned by kaklz above.

    I’ve since moved on to using jEdit (http://www.jedit.org). I find it to be a rather robust editor with everything I was used to from NEdit while giving me some much needed tools via their Plugins architecture.

    If you’re looking for another alternative or just wanna try something new, I’d take a look at jEdit.

  • Blue

    I’ve been using Notepad++ with pretty good results.

    http://notepad-plus.sourceforge.net/uk/site.htm

    Blue

  • http://nathanwwong.com someonewhois

    Hmm, Harry..
    die(‘Something’s wrong’);

    That’s perfectly syntax-sound, is it not? I think what he’s getting at is that the escaped quote should be ignored by the syntax hilighting, and I agree with him. The string is actually Something’s Wrong not Something.

    EditPlus’s FTP feature is AMAZING. You can edit files live, and when you hit ctrl+s it saves the file and uploads it. Also, ctrl+shift+s uploads your file. Very useful feature.

  • Anonymous

    Their own documentation claims that the program can not do syntax highlighting for PHP. These are the types of things that steer me away from programs.

  • arborint

    I installed SciTE and will try it.

    I use Eclipse more and more. With PHPEclipse plugin and Klomp SFTP plugin it is good for web development. It is a very powerful platform if you look at what the Java folks have done with it.

    I think more people in the PHP community should support it. For example, integrating a PHP test framework into Eclipse would be powerful.

  • anubishh

    Seems like it doesn’t run on Win2k3 Server. too bad :) I’ll just install it on Linux.

  • http://www.aska.id.au/ Aska

    I’ve been using SciTE on a daily basis for almost a year now (coming from notepad, htmlkit, dreamweaver, editplus) and never looked back. (well apart from the couple of times when I needed to create image maps) A lovely little editor!

    die( ‘Something’s wrong’ );

    The syntax highlighting for the above works fine for me (I’m on version 1.56 by the way).

  • si

    I’ve tried Eclipse, SciTE and jEdit all whilst making the move from Windows to Linux.

    For me Eclipse is the way to go, the TruStudio PHP plugin is good (and getting better), and Eclipse is good for Actionscript coding as well (albeit a little basic).

    A major plus for Eclipse is the strong version control integration, I have to use CVS for some Sourceforge projects, but prefer to use Subversion, Eclipse has both of these integrated very well.

    peace – si
    sshnug.com

  • http://www.phppatterns.com HarryF

    Hmm, Harry.. die(‘Something’s wrong’);

    That’s perfectly syntax-sound, is it not?

    Good point. Hallucinations or something.

  • http://www.phppatterns.com HarryF

    Actually – dont have a problem with;


    die('Something's wrong');

    In the version I’m using either: v1.61 – handles it correctly.

  • http://www.jeebers.com dereko

    i think if they can add the ftp save options of edit plus then i’d change over and try it for a while…

    The thing is though.. with out your config file harry the editor is not really that great straight out of the box.. This to me is a major issue .. products like this have to work right every time straight out of the box.. haveing to config this that and the other is something that should be taken care of by the developers at least to a certain level. Advanced options can then be configured for more advanced users.

    nice app but needs to be packaged better.

    it’s all about power and simplicity

  • http://www.technosailor.com Sketch

    Wow. Great editor. I’m loving the syntax highlightin and the intutitve function suggestions. :) I’ll play further

  • Bruce

    A lot of people like the default settings right out of the box. For those that don’t, the installer at gisdeveloper.tripod.com may be a better choice.

    For FTP, I use FileZilla with SciTE set as the default editor, but I agree that a built-in FTP / WebDAV capability would be nice, if it could be made done without bloating the small footprint.

  • John Holmes

    Scite is a great editor. I use it for all of my PHP editing. How can you beat all of the features available in a 600K download? It doesn’t require installation, so I keep it on my USB pen drive (128MB) and run it from there whenever I need it.

    It _does_ do PHP highlighting, so I don’t know what the other comment was about. It also correctly highlights the escaped string as talked about above. You can even configure it to color single quoted and double quoted strings differently. PHP variables within double quoted strings are colored differently from the text but left the same for single quoted strings.

    Using the buffers setting, you can have multiple files open in tabs. It supports regex search and replace, find in files, code folding, auto complete, and a ton of other stuff.

    I really like this program and switched form using TextPad and Crimson Editor to using this all the time.

    Here is a link to my global properties file that’s set up for PHP syntax highlighting and other features. Try it out if you want.

    http://www.bigredspark.com/Scite.Global.txt

    Harry could have talked a lot more about this program, but I think he held back. :) It’s got great documentation and almost every single thing you see is customizable through the config files (and fully explained in the documentation).

    Enjoy!

    —John Holmes…

  • John Holmes

    Oh, yeah, forgot a fun feature. It’ll export code to PDF, HTML, Latex and XML with a couple clicks. Awesome way to take that syntax highlighted code and throw it into a PDF to share with others.

    —John Holmes…

  • Jakub

    Their own documentation claims that the program can not do syntax highlighting for PHP.

    Where this is written? PHP syntax highlighting works perfectly.

  • rowan

    I’ve used SciTE for quite some time and love it. May I recommend you use the sciteuser.properties file rather than the sciteglobal.properties one though – sciteglobal is for the default settings with new versions – it is overwritten. Sciteuser is not and therefore makes it easier to retain the settings between version updates.
    Cheers!

  • http://www.phppatterns.com HarryF

    May I recommend you use the sciteuser.properties file rather than the sciteglobal.properties one though – sciteglobal is for the default settings with new versions

    Good point. There’s also an interesting angle there if you’ve got a team of developers working off the same Linux box – the global properties is one way to prevent arguments over whether a tab is four spaces.

    so I keep it on my USB pen drive (128MB) and run it from there whenever I need it

    Now there’s an angle on portability I hadn’t considered. Time for a Swiss Memory Knife

  • Anonymous

    My Favorite one right now is Crimson Editor (http://www.crimsoneditor.com/) I like the small download, and it runs fast too.

  • http://bennettpr.blogspot.com bennettpr

    it can only edit two scripts at a time…or am I missing something?

  • http://bennettpr.blogspot.com bennettpr

    it can only edit two scripts at a time…or am I missing something?

    yes I am – sorry :)

  • MiiJaySung

    Arg. Doesn’t have a Mac OS X port yet :(

  • http://www.phppatterns.com HarryF

    Arg. Doesn’t have a Mac OS X port yet :(

    But you have BBEdit

  • http://www.dubgeiser.net been

    it can only edit two scripts at a time…or am I missing something?

    yes I am – sorry :)

    Actually, you can edit a maximum of 10 buffers at a time (set ‘buffers=10′ in the properties file).
    But you can edit as much files as you want, simply open another SciTE instance ;-)

  • http://limb-project.com pachanga

    SciTE highlighting is way better than in Ultraedit, for instance it can properly highlight multiline strings like


    $q = "SELECT *
    FROM
    ...
    "

    However there are some essential(for me) features missing(present in Ultraedit):
    1) no replace in files – i can’t live without this one!
    2) no functions list
    3) no regex search in files

    BTW, can anyone recommend any decent regex tool which allows to do search&replace job with many files? Yeah, ultraedit allows to search&replace with regez, yet it’s pretty limited(regex support is really ugly :( )

  • Y0Gi

    i’ve been using SciTE for far more than a year and it’s still my first choice. not only that it’s free, it can also be nicely configured. on the other hand, you have to spend some time on that if you dislike the presetting and don’t have your config at hand.

    i find it quite fast (something i don’t remember from jedit) and it handles 20-30 files at the same time without problems (although parallel working on so many files might not be desirable ;-)). eclipse is very sweet, but far to big for little changes like often do. i use the external apps filezilla for ftp and tortoiseCVS/SVN (windows only) f

  • Jan

    I’m using Scite for HTML coding.
    However, I can find only two categories of tags: 1. tags 2. unknown tags. Is there any way to add more categories to distinguish, say, table tags from other tags? Can anyone suggest how to do it?

  • Mehul http://mehulh.blogspot.com

    I like ScITE very much but thing I missed the most was the context menu option which UltraEdit puts in. Well after some googling, I found it. I recommend it.

    http://gisdeveloper.tripod.com/scite.html

    http://www.spaceblue.com/codedetail.php?CodeID=9

    -Mehul

  • David

    SciTE has worked on Mac OS X since 10.2. I’ve been using it on my Mac for over a year now, and it is awesome. To build it, all you need is X11 and fink. Grab finkcommander if you want the GUI. Building your own SciTE from source is pretty basic, if you have a little UNIX knowledge.

    http://fink.sourceforge.net/

  • Tugarinov Sergey

    Russian site about SciTE – http://scite.ruteam.ru

  • prg0906

    kaklz: Scite supports a huge library of languages, and if you haven’t saved the file with a recognized extension then you have to first select it from the Language menu. Otherwise, it can only assume (we all know what assume makes of u and me) and isn’t certain how you want the code highlighted.

    I had the same problem with CFML files until I added the appropriate commands to html.properties. Lucky for us PHP is already recognized! ;) You can find a larger library of PHP functions and properties on the Web, or even use a script to generate a custom library from your own code! I’ve never found another program as customizable as Scite and with such a tiny footprint. </end_drool>

  • Akujin

    This page does not appear correctly in IE7.

    Scite wins also.