Question

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.

Was it helpful?

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.

OTHER TIPS

I had the same error with the Windows version of GVim 8.1 when trying to write a [No Name] buffer to a file name containing #include. Placing a \ before each # in the filename works around the problem.

I thought it would conflict with the Windows convention of using backslashes to separate folders in file paths, but it didn't.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top