插入某些字符时,Vim会自动缩进

时间:2015-03-05 22:04:11

标签: python vim

当插入以下字符fil时,编辑python文件时有时会自动缩进(左移),而我似乎无法预测地重现它。

这是内置了python设置的Macvim。我做过的关于缩进的唯一设置是通过在〜/ .vimrc中执行:set indentkeys-=:来从缩进中删除set indentkeys-=<:>。我还在/Applications/MacVim.app/Contents/Resources/vim/runtime/indent/python.vim中明确删除了此内容。

以下是:scriptnames的输出:

  1: /Applications/MacVim.app/Contents/Resources/vim/vimrc
  2: ~/.vimrc
  3: /Applications/MacVim.app/Contents/Resources/vim/runtime/filetype.vim
  4: ~/.vim/ftdetect/go.vim
  5: /Applications/MacVim.app/Contents/Resources/vim/runtime/menu.vim
  6: /Applications/MacVim.app/Contents/Resources/vim/runtime/autoload/paste.vim
  7: /Applications/MacVim.app/Contents/Resources/vim/runtime/ftplugin.vim
  8: /Applications/MacVim.app/Contents/Resources/vim/runtime/indent.vim
  9: /Applications/MacVim.app/Contents/Resources/vim/runtime/syntax/syntax.vim
 10: /Applications/MacVim.app/Contents/Resources/vim/runtime/syntax/synload.vim
 11: /Applications/MacVim.app/Contents/Resources/vim/runtime/syntax/syncolor.vim
 12: ~/.vim/colors/greens.vim
 13: ~/.vim/plugin/comments.vim
 14: ~/.vim/plugin/Haskell.vim
 15: /Applications/MacVim.app/Contents/Resources/vim/runtime/plugin/getscriptPlugin.vim
 16: /Applications/MacVim.app/Contents/Resources/vim/runtime/plugin/gzip.vim
 17: /Applications/MacVim.app/Contents/Resources/vim/runtime/plugin/matchparen.vim
 18: /Applications/MacVim.app/Contents/Resources/vim/runtime/plugin/netrwPlugin.vim
 19: /Applications/MacVim.app/Contents/Resources/vim/runtime/plugin/rrhelper.vim
 20: /Applications/MacVim.app/Contents/Resources/vim/runtime/plugin/spellfile.vim
 21: /Applications/MacVim.app/Contents/Resources/vim/runtime/plugin/tarPlugin.vim
 22: /Applications/MacVim.app/Contents/Resources/vim/runtime/plugin/tohtml.vim
 23: /Applications/MacVim.app/Contents/Resources/vim/runtime/plugin/vimballPlugin.vim
 24: /Applications/MacVim.app/Contents/Resources/vim/runtime/plugin/zipPlugin.vim
 25: /Applications/MacVim.app/Contents/Resources/vim/gvimrc
 26: /Applications/MacVim.app/Contents/Resources/vim/runtime/ftplugin/python.vim
 27: /Applications/MacVim.app/Contents/Resources/vim/runtime/indent/python.vim
 28: /Applications/MacVim.app/Contents/Resources/vim/runtime/syntax/python.vim

有人可以帮我找出为什么会这样,以及如何避免它?

谢谢!

0 个答案:

没有答案