Re: Vim config problem in jessie
- To: debian-user@lists.debian.org
- Subject: Re: Vim config problem in jessie
- From: Frank Miles <fpm@u.washington.edu>
- Date: Sun, 16 Feb 2014 04:11:35 +0000 (UTC)
- Message-id: <ldpdpn$n1g$1@dont-email.me>
- References: <CAN-5nynMnTDrDrxjv=gUmnRP9984O6L5XUzetaEKruEBo=BCcg@mail.gmail.com>
On Sat, 15 Feb 2014 18:30:02 +0100, rpr nospam wrote:
> On Sat, 15 Feb 2014 04:05:48 +0000 (UTC), Frank Mile wrote:
>>
>> I should have added one more interesting detail. If I comment out the
>> (python) plugin call in /etc/vim/vimrc:
>> if has("autocmd")
>> filetype plugin indent on
>> endif
>>
>> then the tabstops work without the manual override. Having, of course,
>> lost all the nice stuff associated with the plugin. Just to make sure
>> I hadn't messed up the plugin I commented-out the 'set ts=4' that I had
>> appended to the plugin - no change in its behavior :(
>
> Frank, try this:
> $ locate python.vim /usr/share/vim/vim74/ftplugin/python.vim
> /usr/share/vim/vim74/indent/python.vim
> /usr/share/vim/vim74/syntax/python.vim
>
> I'd say your issue is caused by the fact that all that three scripts are
> loaded when you edit python files.
>
> According to vim help (see :help filetypes) the "filetype plugin indent
> on"
> command that you have enabled in /etc/vim/vimrc actually means the
> following:
>
> - vim tries to detect the type of the file that is edited (e.g. let's
> suppose the file type is my_file_type)
> - vim loads the appropriate plugin script:
> /usr/share/vim/vim74/ftplugin/my_file_type.vim
> - vim loads the appropriate indent script:
> /usr/share/vim/vim74/indent/my_file_type.vim
>
> Moreover, if the syntax highlighting is enabled in vim (:syntax on)
> then the appropriate syntax script is also loaded:
> /usr/share/vim/vim74/syntax/my_file_type.vim
>
> In /usr/share/vim/vim74/ftplugin/python.vim I see the following line:
> setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
>
> So, it seems that /usr/share/vim/vim74/ftplugin/python.vim is loaded
> last and overrides tabstop value set by other scripts.
>
> --rpr.
Nice work, rpr! This explains it - down to the differences between
jessie and wheezy or squeeze. I should be able to get it to work _my_
way... thanks!
-F
Reply to: