…There’s no such thing. Or at least as far as I can tell…or not free anyway..
The thing is, that as far as HTML editors go, my requirements are fairly simple, but most editors seem to be full of the flashy extra crap like GUI tag editors and lack the basic things required to make doing the every day stuff simple.
So here’s what I think is essential in an HTML editor -
- Proper concept of a project – not just a directory you point it at, but a real concept of a project, with all the settings and layout saved in the project, allowing you to get right back where you left off. Also, I don’t want to see a messy tree of my filesystem on the left – the site I’m working on will account for less than 0.01% of my filesystem – why show me all the rest of the crap? Just give me an overview of the project directory structure.
- Simple Remote synchronisation – Each project should be able to have a remote location associated with it, and publishing to the site should be a one click operation. Also, synchronisation should work two ways – external changes to the remote site should be detected and the user given the option of merging or overwriting. This should support FTP at a minimum, and probably WebDAV too. Support for source control systems such as Subversion and CVS would be a bonus.
- Flexible tabbed multiple document interface – the ability to split views in arbitrary ways allowing multiple documents on the screen at once without the mess of traditional windows based MDI
- Syntax Highlighting Full support for all HTML standards through to XHTML as well as CSS and javascript is essential.
- Site management functions – Create directories and move / add / copy / delete files through the editor’s interface – have these changes propagated to the remote site when the publish button is pressed.
- Keyboard shortcuts – HTML is text based, and text based means typing – so working on an HTML page should not require you to take your hand off the keyboard any more than is absolutely essential. There should be good keyboard based navigation including marked locations (or bookmarks) as well as shortcuts for all menu and toolbar operations. ESPECIALLY the publish function.
To add to that, here are the Nice To Haves…
- Code completion – I want the editor to understand (X)HTML to the point where it can autocomplete for me – and particularly show me a list of valid options for the current cursor location. This includes (X)HTML tags, attributes and CSS.
- Macros – two ways of doing this – either by assigning each macro to a key combination (CTRL+something, etc), or by assigning them to words, and then having a macro expansion keypress – or tie it in to the code completion system.
- Extra synchronisation remoteprotocol support Support for publishing via rsync, CVS, Subversion, SSH/SFTP, and any other remote protocol or source control system would be good.
- Refactoring – If I move or rename a file it would be good if the editor could update all the links to it in the project
- Flexible syntax highlighting – The ability to install custom highlighting rules, so as to make support for things like server side scripting or CMS templating languages would be useful
- Code Folding – This could be based on block level elements or indentation
- Code formatting options – Configurable formatting options for tidying the code
- Automatic validation – formatting errors and style warnings should be highlighed as I type, with a description of the problem, and maybe even suggested fixes where possible.
- Spell checker- There should be a built in spell checker
- Preview – If a preview mechanism is built in, then it should update automatically as I type. If I have to press a button then I might as well use an external browser. Also to be useful, the preview window should be able to be along side the code window – it’s no good if you have to switch views to get to the preview. Multiple rendering engines should be able to be used (at least IE and Gecko, or KHTML and Gecko on Unix and Mac systems) and it should be possible to use them all at once.
- Image management – Some degree of image management would be useful – even if it’s just a thumbnail representation of the image in the project structure, with the ability to view it full sized in the main pane by clicking on it. Providing resize / rotate and format conversion options would be useful, and so would an easy way to launch a pre defined external editor.
Templating system – a lot more advanced, and not anywhere as important as everything above would be a decent templating system, allowing you to define and include common components, and have it generate pages for you from them. The generated pages would be protected by the editor, which would either prevent you from directly modifying them, or warn you strongly against doing so.
Features that are _not_ useful. Or at least not at the expense of any of the above are the following -
- Predefined tag toolbars – seriously, how difficult is it to type <h1>? Tag toolbars are a waste of valuable screen space. It’s usually far quicker to just TYPE the damned thing than to take your hand off the keyboard, grab the mouse, find the right pallete, click the button, and put your hand back on the keyboard, and with code completion and macros the buttons would be completly irrelevant.
- Tag property dialogues – These always end up being more confusing than helpful, and provide nothing that decent code completion and validation don’t provide. More GUI means more mouse, which means less work done and more RSI.
- Script libraries / HTML fragment databases – Not as easy as macros and not as powerful as a real templating engine – Both of these can be replaced by a keyboard driven macro system – remember, it doesn’t save you time if you have to pick up the mouse and then dig through multiple levels of folders
Of all the tools I’ve tried, the ones that come closest to what I want are not HTML editors, they’re programmers editors – Vim, Kate (KDE), and Eclipse.
Of these, Eclipse shows the most potential – it has the best tabbed MDI interface I’ve ever seen, it has inherent support for macros, code completion, syntax highlighting and refactoring. It uses projects rather than just directories, and has excellent remote synchronisation capabilities. The only problem is that most of those features only work with Java code and Java projects. There are a few projects trying to provide those features for web developement – the Eclipse Web Tools project for start, and the excellent commercial MyEclipseIDE package. However, the former is still in very early stages yet, and the later concentrates on features for J2EE development, so doesn’t really cater for standalone web site development. (it has very good HTML and CSS completion/highligting/validation though).
Remote synchronisation support is only really good with CVS too, and Subversion – which isn’t quite as appropriate for simple web development. There do exist ftp and WebDAV Team plugins, but I’ve never had much luck actually getting them to work.
The other issue with Eclipse is that it’s very large, and full of features not necesary for static web development. However I think that it’s still probably the best bet in the long run. Either that, or I’m going to have to write my own. Right after I learn Swing or SWT….heh
So if anyone reading this knows of an editor that meets at least the essential items at the top, and is free (beer, speech, whatever) or less than $AU100 then let me know!
In the mean time I’ll stick to editing static sites using Kate, and JSP/Servlet web apps with Eclipse and MyEclipseIDE