Minh Triet
Minh Triet

Reputation: 1250

VIM indent setting is not working

My Vim's indent setting sets a width of 4 and disables auto indent, as opposed to what I have set up in .vimrc. Therefore, I always have to :so ~/.vimrc manually to make it works.

I can see that my .vimrc is loaded at start up when running strace -o vim_strace vim. Here is my .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

Upvotes: 0

Views: 406

Answers (1)

Jacob Nash
Jacob Nash

Reputation: 11

are you getting any errors when your start vim?

What I would first try is: set tabstop=2 set softtabstop=0 set expandtab set shiftwidth=2 set smarttab

Upvotes: 1

Related Questions