闻心阁

一蓑烟雨看苍生,半壶浊酒笑红尘

Solve Vim Error Unkonwn Option File (Win7 x64)

2016-08-06 约 1 分钟读完 搬砖秘籍

Dictionary completions is a powerful tool in Vim, but if the feature is powerful is due to you dictionary files. As I find a Vim plugin : asins/vim-dict: vim dict files, when I install it, it doesn’t work, and shows the error as follows:

Unknown option: Files

Solve it

As we konw that in Windows7 x64, the default software install path is like this

C:\Program Files (x86)\Vim

If you are a programmer, I think you can realize the core problem. Yep, it’s the fucking spaces in the path. How to fix it? There is two ways to make it work.

  1. Reinstall you vim in the path like this

    C:\Vim

Believe me, it can solve a lot of Vim Errors.

  1. Hack the plugin source code

Just add the function before execute the path variable.

fnameescape(Path)

Update

If you are using this pulgin on Windows7 x64, it can works, because the author accept my pull request. :-)