thesheep wrote:
OK now I see that 'autoindent' *is* working, in accordance with the help
page, in the sense that each new line copies the left indentation from the
line above it.  But I was hoping for something that automatically indents
all the code intelligently, according to the html tags.  Now I realise that
I've been used to using gVIM on Windows, which seems to have that function. Is there any way to get that functionality in the terminal version of VIM? Sorry for confusion.

To indent according to the syntax, you need to invoke the indent script when editing the file. C editing is almost completely handled by 'cindent' but for HTML it's trickier.

Add one of the following lines near the top of your vimrc (after ":set nocompatible" and/or a ":language" command if there are any, but before the rest):

Method I (recommended):
        runtime vimrc_example.vim

Method II:
        filetype plugin indent on


Then restart Vim.


Best regards,
Tony.

Reply via email to