On 2011-11-18, vasanth kumar wrote: > 3 down vote favorite > share [fb] share [tw] > > > I've got a perplexing Vim problem. If I start editing a new file, say > with vim test.txt, and I type in the word "do" and hit enter (while > still in insert mode), the next line is automatically indented. Before > giving a quick answer, please read this whole post. > > Two questions: > > Why might this happen? > How can I debug the startup process (reading ~/.vimrc and files in > ~/.vim/)? > > More information: > > Here's my .vimrc: http://dotfiles.org/~meonkeys/.vimrc.
Try to access that file using either w3m or wget results in "Internal Server Error". > "do", "if", and "switch" all cause indenting, but I still haven't > figured out what language Vim is using indent rules for. Setting 'smartindent' will do that. > I do have a bunch of stuff in ~/.vim/. Here's that: > http://adammonsen.com/tmp/dot_vim.tgz > I can't find anything in my ~/.vimrc or ~/.vim/ that should turn > on some kind of indenting even if filetype is unset! > If I start Vim using vim -u /dev/null test.txt, the problem goes > away. > Yes, I know about the autoindent setting. I don't think this is > the problem because turning on autoindent after using a null vimrc > doesn't indent the line after "do" is typed in. > > http://123maza.com/48/joy002/ Other options that will affect indenting are 'cindent' and 'indentexpr'. Regards, Gary -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
