Diff and SciTE utilities

A short note about some useful utilities :

  • Visual diff utilities : KDiff3 is the one I choose. I tried tkDiff, but didn’t find it very easy to use.
  • SciTE is very fast and simple : it can be customized to handle XML with Tidy and XmlLint. You have to note that Tidy may modify your file more than you would want ! (ie : you want to fix indentation and it suppresses parts of your files for example).
  • For Windows, you will have to download the XmlLint binaries in the SciTE install directory. For Tidy, the latest version is somehow hidden in SourceForge you have to take it from this very page (No problems on Linux as they are core packages).
  • Lua looks like a great way to improve SciTE too ! look at SciTEStartup.lua (in SciTE directory).
  • Here is my SciTEGlobal.properties

This is the part that I added to html.properties :

command.name.1.$(file.patterns.xml)=Save and Indent XML
command.1.$(file.patterns.xml)=tidy -xml -indent --indent-spaces 4 --wrap 200 --vertical-space y -modify "$(FilePath)"
command.is.filter.1.$(file.patterns.xml)=1
command.save.before.1.$(file.patterns.xml)=1
command.name.2.$(file.patterns.xml)=Save and Well-form XML
command.2.$(file.patterns.xml)=xmllint --noout "$(FilePath)"
command.is.filter.2.$(file.patterns.xml)=1
command.save.before.2.$(file.patterns.xml)=1
command.name.3.$(file.patterns.xml)=Save and Validate XML
command.3.$(file.patterns.xml)=xmllint --noout --valid "$(FilePath)"
command.is.filter.3.$(file.patterns.xml)=1
command.save.before.3.$(file.patterns.xml)=1

Leave a Reply

Please log in using one of these methods to post your comment:

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: