ftdetect scripts not loaded from directories added to runtimepath
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| vim (Ubuntu) |
Undecided
|
Unassigned |
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 : | #1 |
Will Gray (graywh) wrote : | #3 |
And this is the sort of thing James Vega was warning about (https:/
Launchpad Janitor (janitor) wrote : | #4 |
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 : | #6 |
@garrison-codefix The workaround is to turn filetype detection off and back on after you've modified 'runtimepath'.
DavidBriscoe (idbrii) wrote : | #7 |
This is possibly fixed in Vim 7.3.430 (which is just ahead of the vim released in precise).
James McCoy (jamessan) wrote : | #8 |
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).
Just for crossreference, "syntax on" was set in Bug #63172.