0

I am using Vim with Sparkup and I have two questions:

  1. Sparkup works only with files that end with a HTML extension, however, I would like to use it with TPL, XML, or essentially, any hypertext markup based file. Is that possible?
  2. Unlike the zen-coding plugin it's based on, I can't seem to get zen-coding CSS output. I thought I saw the lack of it in the spark-up files. Does anyone know how to activate it or easily add it?

(I am using Ubuntu 12.04, 7.3.)

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Lui
  • 3
  • 1

3 Answers3

2

sparkup is a filetype plugin. It depends on the filetype of current file.
When you edit a xml file, :set ft=html to change filetype manually.
Then you can use the sparkup plugin.


If you want vim do it automatically, put this command into your .vimrc:

au BufNewFile,BufRead *.xml,*.tpl set ft=html
kev
  • 155,172
  • 47
  • 273
  • 272
0

Sparkup only deals with HTML. Adding CSS would mean rewriting it. If you want Zencoding why don't you use Zencoding?

Also I don't remember Zencoding doing "css output", whatever that means. Could you provide an example?

romainl
  • 186,200
  • 21
  • 280
  • 313
  • I'll do better, look on page 4. [zencoding](http://code.google.com/p/zen-coding/downloads/detail?name=ZenCodingCheatSheet.pdf) – Lui Sep 11 '12 at 17:08
  • Thanks. There's no mention of that in `:h zencoding`, that's a shame. Anyway my answer stands: Sparkup is only for HTML and adding proper CSS may be a non-trivial task. – romainl Sep 11 '12 at 20:09
0

For your record, a better way is to go into the ftplugin directory of the sparkup extension, make a soft link to the folder html with the name 'xml'. This makes sure that you still have the choice to customize xml and html differently.

L__
  • 866
  • 1
  • 9
  • 15