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
(CSS mention)
(Update on example vim plugin)
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Inspired by the [http://www.openajax.org/member/wiki/IDE OpenAjax IDE task force].
= vim =


= [http://www.vim.org/ VIM] =
vim natively ships with CSS, Javascript & HTML syntax highlighting provided the feature is switched on.


See the [http://blog.whatwg.org/vim-checker HTML5 conformance checking in Vim blog entry] for an introduction.
vim also has completion features documented at http://vimdoc.sourceforge.net/htmldoc/insert.html#ft-css-omni


Idea is to integrate Web services via [http://en.wikipedia.org/wiki/CURL curl] with your editor [http://en.wikipedia.org/wiki/Vim_editor vim].
https://github.com/kaihendry/vim-html5/ provides an example with a [http://youtu.be/fhDSPOLzdbw video tutorial] of howto integrate with validator.nu, jshint, csslint et al.


* HTML validation with [http://validator.nu/ validator.nu] script
= Emacs =
* JavaScript validation with [http://www.jslint.com/ JSlint] script - [http://git.webvm.net/?p=jslint service source]
* CSS validation is [http://lists.w3.org/Archives/Public/www-validator-css/2008Jul/thread.html being worked on]


== Quick setup ==
=== XHTML5 or polyglot documents ===


nox:~/.vim/ftplugin% svn co http://svn.natalian.org/projects/html5/ .
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].
  nox:~/.vim/ftplugin% sudo ln -s `pwd`/validate-html.sh /usr/bin/validate-html.sh
nox:~/.vim/ftplugin% sudo ln -s `pwd`/validate-js.sh /usr/bin/validate-js.sh


== Improving the scripts ==
[[Category:Implementations]]
 
Any suggestions? Please get in contact with [http://hendry.iki.fi/ hendry]
 
Caveats:
* Vim's makeprg syntax requires some horrible escaping, hence the need for an external script
* 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

Latest revision as of 16:09, 19 May 2014

vim

vim natively ships with CSS, Javascript & HTML syntax highlighting provided the feature is switched on.

vim also has completion features documented at http://vimdoc.sourceforge.net/htmldoc/insert.html#ft-css-omni

https://github.com/kaihendry/vim-html5/ provides an example with a video tutorial of howto integrate with validator.nu, jshint, csslint et al.

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.