I've tried to find what's causing this and can't.
Currently, I'm working on an HTML doc and say for example, the cursor is
on a line that has only a </p> tag on it. I position the cursor to the
end of the line and press ENTER to go to the next line to begin the next
paragraph BUT... when I do, the preceding </p> tag indents itself 1 tab
space to the right. If I've got lots of paragraphs to add, eventually,
the width of the paragraphs gets narrower and narrower because they all
want to indent when I press ENTER after them.
How do I stop them from indenting when I press enter to go to the next
new line?
TIA and Regards,
Steve Laurie
I'm not sure why vim thinks your </p> tag needs to be indented one
more level, but the fact that it does it when you hit ENTER could be
caused by the value of either 'cinkeys' or 'indentkeys'. If either of
those options have an "o" in them, vim indents the current line when
you hit ENTER.
My solution may be a hack, but it works. I put this in my _vimrc:
au FileType html,xhtml setlocal indentexpr=
Best regards,
Yongwei
--
Wu Yongwei
URL: http://wyw.dcweb.cn/
Can you show us the simple HTML that demonstrates this.
Just to be sure, you didn't want to use <p/> instead right?
The indent/html.vim file is designed to be customizable.
You can control which tags should be indented and which shouldn't.
This is done via your .vimrc.
Dave