vimsparkup

vim sparkup tpl


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.)


Solution

  • 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