A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).

IDE: Difference between revisions

From WHATWG Wiki
Jump to navigation Jump to search
(Added video tutorial)
No edit summary
Line 40: Line 40:


Emacs ships with [http://www.thaiopensource.com/nxml-mode/ nxml-mode], a major mode for editing XML which does on-the-fly validation with RELAX NG schema. You can plug [http://wiki.whatwg.org/wiki/HTML5_Conformance_Checker#The_Schemas  fantasai and hsivonen's schema] into nxml-mode. The necessary shim code is included in the [http://github.com/hober/html5-el/tree/master hober/html5-el project on github].
Emacs ships with [http://www.thaiopensource.com/nxml-mode/ nxml-mode], a major mode for editing XML which does on-the-fly validation with RELAX NG schema. You can plug [http://wiki.whatwg.org/wiki/HTML5_Conformance_Checker#The_Schemas  fantasai and hsivonen's schema] into nxml-mode. The necessary shim code is included in the [http://github.com/hober/html5-el/tree/master hober/html5-el project on github].
[[Category:Implementations]]

Revision as of 07:51, 26 January 2011

vim

<video controls src="http://static.natalian.org/2010-10-24/html5-vim.ogv">

HTML5 text/html syntax

https://vim.svn.sourceforge.net/svnroot/vim/vim7/runtime/autoload/xml/ and :help xml-omni-datafile might help you get started.

Ideally some sort of tool to convert http://syntax.whattf.org/relaxng/ into a xml-omni-datafile is required. Updating https://vim.svn.sourceforge.net/svnroot/vim/vim7/runtime/autoload/xml/html40s.vim looks a bit too painful.

Lint

See the HTML5 conformance checking in Vim blog entry for an introduction.

Idea is to integrate Web services via curl with your editor that supports Validator.nu_GNU_Output, e.g. vim:

Javascript unpacker and beautifier

Drop it into ~/.vim/ftplugin/jsbeautify.vim from http://www.vim.org/scripts/script.php?script_id=2727 and simply `source ~/.vim/ftplugin/jsbeautify.vim` from http://svn.natalian.org/projects/html5/javascript.vim

To run the beautifier, typically it's the keystrokes [\]+[f]+[f].

Installation instructions

http://svn.natalian.org/projects/html5/INSTALL

Any suggestions? Please get in contact with Kai Hendry

Caveats:

  • Vim's errorformat has issues parsing anything too complex, so best edit the stream for the errorformat (not the other way around)
  • Vim's quickfix list (:cope) seems to require a filename (%f) in the error format

Emacs

XHTML5 or polyglot documents

Emacs ships with nxml-mode, a major mode for editing XML which does on-the-fly validation with RELAX NG schema. You can plug fantasai and hsivonen's schema into nxml-mode. The necessary shim code is included in the hober/html5-el project on github.