On 2013-11-20, Bartosz Gradzik wrote:
> Test 3: "vim -N --noplugin: (with ~/.vimrc (one line to change rtp), with
> ~/.vim/filetype.vim)
> :set rtp?
>
> runtimepath=~/Desktop,~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/u
> sr/share/vim/vimfiles/after,~/.vim/after
> :filetype on
> :scriptnames
> 1: /etc/vimrc
> 2: /usr/share/vim/vim74/syntax/syntax.vim
> 3: /usr/share/vim/vim74/syntax/synload.vim
> 4: /usr/share/vim/vim74/syntax/syncolor.vim
> 5: ~/.vim/filetype.vim
> 6: /usr/share/vim/vim74/filetype.vim
> 7: /usr/share/vim/vim74/ftplugin.vim
> 8: ~/.vimrc
> 9: ~/Desktop/filetype.vim
>
> Here I can see that filetype.vim from desktop is last but base on rtp it
> should be first.
>
> It looks like VIM does not load ~/Desktop/filetype.vim at the beginning
> since rtp is updated with ~/.vimrc at point 7.
>
> I am pretty sure all problems are made because /etc/vimrc. I do not
> understand why VIM loads that file.
> Right now I not able to touch that file since I have no permission (this is
> computer at work).
I think you're analysis is correct.
The system vimrc is not considered a plugin or a runtime file, so it
is not affected by 'rtp'. Its location is hard-coded into Vim at
compile time. See ":help system-vimrc".
I've been frustrated by the lack of a convenient way to tell Vim to
ignore that file, too. I have used two solutions.
The first and by far the best is to use Mercurial to get a local
copy of the Vim source and build it yourself. Your Vim will then be
up to date and you can put the system vimrc any place you like, or
not have one at all. Unfortunately, this solution is not always
possible in a corporate environment.
The second solution is to inspect the system vimrc and undo the
settings you don't like at the top of your ~/.vimrc. In your case,
that would include the following sequence.
filetype off
syntax off
set rtp^=~/Desktop
filetype on
syntax on
HTH,
Gary
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Wednesday, November 20, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment