1

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.

shivam
  • 16,048
  • 3
  • 56
  • 71

2 Answers2

2

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.

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
  • Thanks a lot. I found the culprit. I had - autocmd FuncUndefined * exe 'runtime autoload/' . expand('') . '.vim' set in my vimrc. I guess i did that for some other plugin long ago which im no more using. Commenting it solved my problem. :) – shivam Jun 04 '14 at 09:42
0

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.

Nathan Mills
  • 2,243
  • 2
  • 9
  • 15