On 10/21/06, Luc Hermitte <[EMAIL PROTECTED]> wrote:
Hello,

* On Fri, Oct 20, 2006 at 11:39:10PM +0200, Yakov Lerner <[EMAIL PROTECTED]> 
wrote:
> Let's say I edit file x (vim x) which is a symlink, x->y.
> (Linux). How can I make a script that opens y
> instead of x in the buffer (chases the symlinks and opens it)

Are you looking for realpath?

<In case the script you are looking for is a shell script (not a viml one)>
AFAIK, realpath does not work on non existant files -- that could be
problematic if you wish to follow directories.
Moreover you will have to distinguish between files passed to vim from
vim arguments like "-c /foo".

In the end you will implement something very similar to the script
cyg-wrapper I'm maintening (check my signature). The easiest thing to do
is probably to adapt cyg-wrapper to not use "cygpath" and other programs
related to windows (like "start")
</>

Otherwise, may be you can play with things like FilePreRead and :file ?

Thanks

Yakov

Reply via email to