0

I have a linux box running ubuntu 15.04 (vim7.4).

I'm using the same .vimrc and .vim as my Macbook (vim7.3).

However, the behavior is different...

Inside my linux box, :verbose set ts shows the value is "Last set from /usr/share/vim/vim74/ftplugin/python.vim".

On my mac, :verbose set ts shows the value is "Last set from ~/.vimrc".

Of course I hope ts is set according to my .vimrc file.

I tried to Google for answers. Some posts suggested me to turn off filetype. I tried to set filetype off in .vimrc. However, even this is not honored (not only for python files though). :filetype shows that detection, plugin, and indent are all on for any file.

This is driving me crazy... Any ideas?

relevant lines from my .vimrc:

syntax on
filetype off

execute pathogen#infect()

set enc=utf-8
set fileencoding=utf-8
set fileencodings=utf-8,gbk,gb18030,utf-16,big5,unicode
set nocp
set nu
set backspace=indent,eol,start
set shiftwidth=2
set tabstop=2
set softtabstop=2
set expandtab
set lbr
set sm
set autoindent
set clipboard+=unnamed
set list
set listchars=tab:>-,trail:<
set scrolloff=5
set vb t_vb=
set ruler
set incsearch
set ignorecase
set smartcase

Plugins installed with pathogen:

.vim/bundle:
a.vim              emmet-vim          nerdtree           syntastic          tlib_vim           vim-airline        vim-easymotion     vim-sensible       vim-snipmate       vim-surround
ctrlp.vim          evervim            supertab           taglist            vim-addon-mw-utils vim-dispatch       vim-matchit        vim-shebang        vim-snippets
Awaken
  • 139
  • 6
  • Can you show the relevant lines of your vimrc file? – Lærne Oct 15 '15 at 07:40
  • 4
    Plugin scripts are loaded after `.vimrc`. If a plugin overrides your `.vimrc` setting unconditionally, you will be getting the plugin setting. Also, you should not be setting Python settings in `.vimrc` anyway - they should go into `~/.vim/ftplugin/python.vim` or `~/.vim/after/ftplugin/python.vim`, with `setlocal`. – Amadan Oct 15 '15 at 08:06
  • @Amadan I guess then, the problem becomes why on my Mac, the exact same set of settings and plugins gives me tabstop=4. I don't have anything in .vim/ftplugin/ or .vim/after/ftplugin on either my linux box or my mac. – Awaken Oct 15 '15 at 19:16
  • @Awaken The runtime has its own version of `ftplugin/python.vim`. The accepted answer (in the duplicate) has a link to the line which overrides your settings. – FDinoff Oct 15 '15 at 23:36

0 Answers0