My .vimrc has a string "set tabstop=4", but it doesn't apply when i open something, for example, python file. Here's my full .vimrc:
cnoremap Q q
au! BufWritePost .vimrc source %
set tabstop=4
set shiftwidth=4
set smarttab
set expandtab
set softtabstop=4
set autoindent
"set syntax=off
set t_co=256
strace says vim reads /home/user/.vimrc, and he really reads this file, for example, cnoremap works, he replaces :Q by :q as expected, but if i, for example, uncomment set syntax=off, it does not apply.
Also, vim -V2 says next:
...
считывание сценария "$HOME/.vimrc"
Поиск "syntax/off.vim syntax/off/*.vim" в "/home/user/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim80,/usr/share/vim/vimfiles/after,/home/user/.vim/after"
not found in 'runtimepath': "syntax/off.vim syntax/off/*.vim"
...
Of course, i thought, it was something with options. But if i made in editor :so $MYVIMRC, he applies all settings!
Right now i live with bash alias vim="vim -S ~/.vimrc", and in verbose mode he applies .vimrc without errors and works as expected, but that's weird solution.
What could be wrong here? And why vim does not apply tabstop/syntax from .vimrc?
Output of :verb set ts
tabstop=8
В последний раз опция изменена в /usr/share/vim/vim80/ftplugin/python.vim
Output of :scriptnames
1: /etc/vimrc
2: /usr/share/vim/vim80/syntax/syntax.vim
3: /usr/share/vim/vim80/syntax/synload.vim
4: /usr/share/vim/vim80/syntax/syncolor.vim
5: /usr/share/vim/vim80/filetype.vim
6: /usr/share/vim/vimfiles/ftdetect/dockerfile.vim
7: /usr/share/vim/vimfiles/ftdetect/nginx.vim
8: /usr/share/vim/vimfiles/ftdetect/stp.vim
9: /usr/share/vim/vim80/ftplugin.vim
10: ~/.vimrc
11: /usr/share/vim/vim80/plugin/getscriptPlugin.vim
12: /usr/share/vim/vim80/plugin/gzip.vim
13: /usr/share/vim/vim80/plugin/logiPat.vim
14: /usr/share/vim/vim80/plugin/manpager.vim
15: /usr/share/vim/vim80/plugin/matchparen.vim
16: /usr/share/vim/vim80/plugin/netrwPlugin.vim
17: /usr/share/vim/vim80/plugin/rrhelper.vim
18: /usr/share/vim/vim80/plugin/spellfile.vim
19: /usr/share/vim/vim80/plugin/tarPlugin.vim
20: /usr/share/vim/vim80/plugin/tohtml.vim
21: /usr/share/vim/vim80/plugin/vimballPlugin.vim
22: /usr/share/vim/vim80/plugin/zipPlugin.vim
23: /usr/share/vim/vim80/syntax/python.vim
24: /usr/share/vim/vim80/ftplugin/python.vim
:scriptnames? If you want to capture it, you can use the:redircommand (see:h :redir). - user852573:verb set ts?? - user852573tabstopoption. If you want to override this, you could writesetlocal tabstop=4inside~/.vim/after/ftplugin/python.vim. You can create the file and the missing directories if needed. Otherwise, you could add an autocmd inside your vimrc listening to theFileTypeevent to do the same thing. - user852573