Limit default rtp rearrangement
Rearranging rtp so that **all** default directories appear first has the undesired side effect of not allowing plugins to override default syntax files. This changeset limits the rearrangement of the rtp to simply making sure the first directory in the default runtimepath appears first in also in the runtimepath after Vundle has finished manipulating it. This should keep the original bugs fixed and should eliminate the aforementioned undesired side effect. Fixes #430 Fixes #456
This commit is contained in:
parent
0afe058353
commit
a917677879
@ -166,15 +166,12 @@ func! s:rtp_add_defaults()
|
||||
set rtp&vim
|
||||
let default = &rtp
|
||||
let &rtp = current
|
||||
for item in reverse(split(default, ','))
|
||||
let item = fnameescape(item)
|
||||
exec 'set rtp-=' . item
|
||||
if fnamemodify(item, ":t") == 'after'
|
||||
exec 'set rtp+=' . item
|
||||
else
|
||||
exec 'set rtp^=' . item
|
||||
let default_rtp_items = split(default, ',')
|
||||
if !empty(default_rtp_items)
|
||||
let first_item = fnameescape(default_rtp_items[0])
|
||||
exec 'set rtp-=' . first_item
|
||||
exec 'set rtp^=' . first_item
|
||||
endif
|
||||
endfor
|
||||
endf
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user