On Wed, Dec 03, 2008 at 03:09:48PM +0100, Shade - wrote:
> But i don't know why it doesn't work with Windows (I already installed perl
> in order for it to work). It keep saying Can't find string terminator.
The entire error message you should be seeing is
Can't find string terminator "'" anywhere before EOF at -e line 1.
Which is an error message from Perl. This occurs on line 2 of the
function, in the system() call. I believe it has to do with cmd.exe's
crappy rules about single and double quotes. In short, don't use
single quotes in cmd.exe.
I changed that line so it would work on Windows:
let l:list=system("find . -iname '*".l:_name."*' -not -name \"*.class\"
-and -not -name \"*.swp\" -and -not -name \".*\" | perl -ne \"print
\\\"$.\\t$_\\\"\"")
However, this script makes use of the UNIX find utility. Windows
ships with its own find.exe, which doesn't use the same switches and
arguments as the UNIX one. On Windows, that command will never find
your file, and you always get the message that your file is not found.
You can install the Win32 port of the UNIX find utility and try again.
It's located here:
http://gnuwin32.sourceforge.net/packages/findutils.htm
After you install it, make sure its directory appears in your %PATH%
before C:\WINDOWS\system32, or else Vim will probably run the original
Windows version.
I still couldn't get it to find my file, but this should be a good
start. Now, I need to get back to my day job!
Good luck
--
Erik Falor
Registered Linux User #445632 http://counter.li.org
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---