Code Editor

I use almost always SciTE. But in some case, I have to use Vim (PHP and HTML indenting, block selection, diff and patch) and PHPEdit (PHP formating with code beautifier, OOP, debug mode.)

Scintilla Text Editor

Updated : 19/04/2004. (not finished !)

SciTE is a fast and powerfull editor based on Scintilla, like many other products (Komodo, Anjuta, gPHPEdit ...) Here I keep and share some tips and settings.

The MS-Windows version

Here is a specialy crafted installer for MS-Windows which install Scite with many options and features. Thanks to Bruce Dodson.

Settings

Here are some usefull settings. From the "Option" menu, you can "Open Global Option File " (SciTEGlobal.properties)

Embed Tidy

How to embed the Tidy html utility. (If you didn't use Bruce's installer, don't forget to install it fist !)

From the "Option" menu, you can "Open html.properties". Near the end of the file, add this :

command.name.2.$(file.patterns.html)=HTML Tydi
    command.2.$(file.patterns.html)=tidy --indent auto --wrap-asp no --wrap 150 --char-encoding raw -modify "$(FilePath)" 
    #char-encoding: raw  pour ne pas mettre des ê
    command.is.filter.2.$(file.patterns.html)=1
    command.save.before.2.$(file.patterns.html)=1

This is documented in SciTEDoc, search for "command.name", since there are no anchors ...

When you use it (menu Tools), you should look at the output (F8) because if Tidy encounters errors, the file isn't modified. You have to correct the errors at hand first and then rerun Tidy.

Note : be carefull when using Tidy on PHP ! Make a diff and check every changes ! I strongly advice to use Vim in this case.

GVim

Updated : 23/04/2004. (not finished !)

Vim is not very ergonomic (Well, it is if you know how to use it), but is still simplier than emacs, and has some special features !

Indenting HTML + PHP

Vim has a site with a lot of script files to indent, I used the one from Pim Snel here on the vim site (slightly modified.)

  1. Choose the syntax (html)
  2. select the area to indent
  3. crtl-o to get out of select mode
  4. = to indent