in VIM

Making FuzzyFinder work in MacVim 7.3

I have seen many posts that are having trouble getting FuzzyFinder to work in MacVim. In certain configurations you will see multiple errors “E806: using Float as a String”. This is because some locales make MacVim treat floating point numbers differently. Here is how I did to make it work on my system (OS X 10.6.4 and MacVim 7.3). As an added bonus we will map it to the Apple-T key and default it to subdirectory search.

If you try “:let s = 0.5” in MacVim and get an error you are affected. This happens when you have launched MacVim from Finder. In this case MacVim does not pick up all the locale settings properly for some reason. This includes the settings for the separator character in floating point numbers which may make all vim scripts with a dot separator (“0.05”) fail.

1. Install the FuzzyFinder script (including the l9 library).

2. In your .gvimrc add the following lines. This will deconnect the Apple-T from File->New tab and instead invoke FuzzyFinder with a wildcard for subdir search:

if has("gui_mac") || has("gui_macvim")
  macmenu &File.New\ Tab     key=<Nop>
  map <silent><D-t> :FufFile **/<CR>
endif

Now, start MacVim from terminal with “mvim” instead of double-clicking the icon in Finder and try Apple-T. FuzzyFinder should now work correctly. Here are some of the discussions for reference:

Write a Comment here on the real web

Comment