I am looking for any pointers with regards to editing html with Vim.
The HTML documents I need to edit will use css (probably inline) but no JavaScript or any other "technique".
So, I thought there must be people more knowledgebale than me in that area that could give me some hints as to where I could find some tools, or scripts or Vim plugins that assist me while I am editing the documents.
FWIW, I am using Vim 7.3.
I'm happy with SnipMate. It comes with a bunch of default snippets for many languages including HTML and JavaScript but they are easy to modify/augment: here is my customized html.snippets.
SparkUp allows you to use compact CSS syntax to write massive amounts of HTML, it's a bit too rigid for my taste, though.
To be able to use Omni Completion for CSS you will need to change the "file type" setting for the buffer like this: :set ft=css.html.
Also Vim itself is very powerful for HTML even without fancy plugins:
cit will remove text from <p>text</p> and leave you in insertion mode between the opening and closing tags
dat will delete the whole <p>text</p>
:norm I and :norm A let you append text at the beginning and end of multiple visually selected lines
and so on…
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With