ftdetect scripts not loaded from directories added to runtimepath

Bug #572627 reported by Will Gray on 2010-04-30
This bug affects 11 people
Affects Status Importance Assigned to Milestone
vim (Ubuntu)

Bug Description

Binary package hint: vim-common

Introduced in version 2:7.2.330-1ubuntu3 in 10.04 Lucid Lynx.

The file /etc/vim/vimrc from the package vim-common has un-commented the line "syntax on", turning on vim's syntax highlighting. This causes filetype detection to be enabled, which loads all ftdetect scripts from the runtimepath. This change is harmful to users of the pathogen.vim script, which edits the runtimepath. All the ftdetect scripts that would have been found by doing "syntax on" or "filetype on" after using pathogen are not found by the call to "syntax on" that happends before using pathogen. This causes filetypes introduced in the bundles installed using pathogen to not get detected.

Dustin Kirkland  (kirkland) wrote :

Just for crossreference, "syntax on" was set in Bug #63172.

Will Gray (graywh) wrote :

And this is the sort of thing James Vega was warning about (https://bugs.launchpad.net/ubuntu/+source/vim/+bug/63172/comments/9).

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vim (Ubuntu):
status: New → Confirmed

Unsurprisingly, this is still an issue in Ubuntu 12.04--is there a suggested workaround?

Will Gray (graywh) wrote :

@garrison-codefix The workaround is to turn filetype detection off and back on after you've modified 'runtimepath'.

DavidBriscoe (idbrii) wrote :

This is possibly fixed in Vim 7.3.430 (which is just ahead of the vim released in precise).


James McCoy (jamessan) wrote :

This isn't something that can be fixed by a patch. 7.3.430 is addressing a different problem. This one is completely an issue with the inclusion of "syntax on" in /etc/vim/vimrc. It can be worked around, but that is something many users will not know how to do (which is why the pathogen plugin has since started performing the workaround itself).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.