Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I seem to have a problem with my local Vim configuration but I'm not sure what it is. I need to override some filetype-specific settings. As per multiple tutorials/howtos, I created ~/.vim/after/ftplugin/cpp.vim with appropriate setlocal statements, but it seems not to be read. I checked that ~/.vim/after is in runtimepath.

I worked around this with autocmd FileType cpp setlocal ... in ~/.vimrc, but that is beyond the point. Any advice on how to diagnose/fix this? Or am I just overlooking something obvious?

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

Check the output of:

:filetype

You may need to add

filetype plugin on

to your .vimrc (or at least add 'plugin' to your 'filetype' setting).

share|improve this answer
    
This and :scriptnames helped. Thanks! –  AdSR Aug 3 '10 at 10:46
add comment

A good place to start would be to use the :scriptnames command. Open a C++ file however you normally do and execute

:scriptnames

This will show you the files that Vim has sourced since it was started.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.