On 2013-11-19, Bartosz Gradzik wrote:
> Hi All,
>
> I want to use my own filetype.vim script to load a filetype plugin.
>
> When VIM start uses his own filetype.vim from installation
> directory and base on the file content incorrect file type is set.
> As I found in documentation (43.2 Adding a filetype) another
> filetype.vim will not set a new file type when it is already set
> for the file.
>
> Order which filetype.vim file is first I am checking with
> :scriptnames command.
>
> As I understand load order is control with runtimepath option. I
> changed &rtp to load my filetype.vim script before VIM's
> filetype.vim. It works on Windows but not on Redhat 5 (both have
> VIM 7.4).
>
> When I compare runtimepath option and scriptnames I see VIM load
> scripts not in order of paths from &rtp. Is it normal? Does not
> &rtp control order how the scripts are loaded?
Yes, it does. I have modified my 'rtp' in my ~/.vimrc and Vim
sources scripts in the order specifed by the modified 'rtp'.
> How can I force VIM to load my filetype.vim as first?
You shouldn't have to change anything to get Vim to source your
filetype.vim first. I have my own filetype.vim and as you can see
here, it is sourced first.
$ vim -N -u NONE
:filetype on
:scriptnames
1: ~/.vim/filetype.vim
2: /usr/local/share/vim/vim74/filetype.vim
Regards,
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.
Tuesday, November 19, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment