I'm having trouble editing HTML in an older version of VI(M). VIM - Vi IMproved 6.3 (2004 June 7, compiled [...] 2005). When reading .sh shell scripts there is no problem, though.

It doesn't recognize html files for syntax highlighting. Is there any to force a particular language interpretation even if the editor doesn't recognize it? In emacs, M-x html-mode informs the editor what language you're actually editing.

I can't upgrade because this is running in servers.

link|improve this question

feedback

2 Answers

up vote 1 down vote accepted

Assuming Vim is installed correctly the command is :set filetype=html, see :help filetype for more information.

You can shorten it to :set ft=html.

Happy retro-vimming!

link|improve this answer
Thanks for the information! It works. – Vlueboy Oct 7 '11 at 21:50
feedback

You can force vim to use the language you want with

:setf html

See

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.