vimctrlp

Vim E194: No alternate file name to substitute for '#'


I am using ctrlp.vim plugin which is essentially a file finder. I followed the installation steps as mentioned here:

http://kien.github.io/ctrlp.vim/#installation (using git)

My plugin is working fine and as expected but on starting vim I get following error:

Error detected while processing FuncUndefined Auto commands for "*":
E194: No alternate file name to substitute for '#': runtime autoload/ctrlp#utils#cachedir.vim
Press ENTER or type command to continue

On removing set runtimepath^=~/.vim/bundle/ctrlp.vim from my vimrc the error goes away but obviously even my plugin stops working which is not desired.

Please help.


Solution

  • The format of that command is wrong: Instead of

    runtime autoload/ctrlp#utils#cachedir.vim
    

    it should be

    runtime autoload/ctrlp/utils/cachedir.vim
    

    The # separator is used when calling autoload functions, but :runtime requires a path, with path separators. In there, the special identifiers such as # and % are in effect, and that causes the error.


    To fix that, find out from where this wrong command is issued.

    :verbose autocmd FuncUndefined
    

    is a good start.