On 3/1/07, François Ingelrest <[EMAIL PROTECTED]> wrote:
Hello all,

This is something that annoys me a lot, and I don't know how to get
rid of it: as soon as I open a new file, auto indentation is lost.
Suppose I am editing a Python file:

def func():

If I hit enter after this line, the cursor will be placed on the next
line with correct indentation. Now suppose I open a new Python file by
using :E. If I try to do the same thing, the cursor is no longer
correctly indented when I create new lines, i.e., it is always placed
at the beginning of the new line. Syntax highlight is still ok, only
auto indentation is lost.

Is it possible to correct that behavior?

Do you have autocommands in the spirit of 'au BufNewFile ...'
in your vimrc that disable autoindenting ?

You can try to find and erase those autocommands. Or you
you can try to fix it without searching for the culprit:

  au BufRead * set  autoindent cindent smartindent " add to vimrc
  au BufRead * filetype plugin indent on " add to vimrc

Does it work for you ?
Yakov

Reply via email to