Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


pathogen breaking perl filetype detection #40

alaska opened this Issue · 7 comments

2 participants


I have a perl script I'm working on that is being detected as a conf file incorrectly after installing pathogen.

If I edit this file, it is highlighted incorrectly and

':set filetype?'



If I type ':filetype detect'

It resets its syntax highlighting to perl.

If I remove pathogen from autoload, the file appears as a perl file when first loaded (as it should).


Looks to be the same as #38. If you take out the call to pathogen and put the following instead, does it still break?

filetype off
filetype on

It is still broken, yes.


The 'filetype off' followed by the 'filetype on' is definitely what breaks it. If I alter my .vimrc to read:

"call pathogen#infect()
call pathogen#runtime_append_all_bundles()
syntax on
filetype plugin indent on

It works peachy.


Well there's your workaround. Are you on Gentoo as well?


Conf highlighting is a weird special case: It's the last check in filetype.vim and looks for # comments near the top of the file. That doesn't explain much, though.

I'm guessing you're just not looking hard enough for that filetype on. Debian, for instance, used to have it in debian.vim (but it seems to have been removed). Maybe :grep '^ *filetype.*on' $VIM/**/*.vim /etc/vim.

I'm closing this as a dupe of #38. Additional information should be posted there.

@tpope tpope closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.