VIM缩进设置不起作用

时间:2018-05-03 11:59:03

标签: vim

我的Vim的缩进设置将宽度设置为4并禁用自动缩进,而不是我在.vimrc中设置的内容。因此,我总是必须手动:so ~/.vimrc才能使其正常工作。

我可以看到我的.vimrc在启动时加载strace -o vim_strace vim。这是我的.vimrc

set autoread
set nocompatible              " be iMproved, required
filetype off                  " required


" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

Plugin 'VundleVim/Vundle.vim'

Plugin 'tpope/vim-fugitive'
Plugin 'git://git.wincent.com/command-t.git'
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
Plugin 'davidhalter/jedi-vim'
Plugin 'ervandew/supertab'
call vundle#end()            " required
filetype plugin indent on
syntax on

set number
set tabstop=2 softtabstop=0 expandtab shiftwidth=2 smarttab
if &term =~ "xterm\\|rxvt"
  " use an orange cursor in insert mode
  let &t_SI = "\<Esc>]12;orange\x7"
  " use a red cursor otherwise
  let &t_EI = "\<Esc>]12;red\x7"
  silent !echo -ne "\033]12;red\007"
  " reset cursor when vim exits
  autocmd VimLeave * silent !echo -ne "\033]112\007"
  " use \003]12;gray\007 for gnome-terminal and rxvt up to version 9.21
endif

1 个答案:

答案 0 :(得分:1)

你在启动vim时遇到任何错误吗?

我首先尝试的是: set tabstop=2 set softtabstop=0 set expandtab set shiftwidth=2 set smarttab