Hi,
Robert Webb wrote:
>
> Another simple question:
>
> In a vim script, how do I compare two file names to see if they are the same
> file? They may be relative or absolute paths.
>
> Obviously if I can expand both to a full path then the comparison is easy,
> but expand("path/file:p") doesn't do it. ":p" only works after "%" etc.
use fnamemodify() instead of expand().
Regards,
Jürgen
--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---