> I'm wondering if there is a command to cd to the dir where the current
> open file in. In the case that the file is a symbolic link, I want to
> cd to the dir whether the actually file that this symbolic link points
> to.
You might be able to use something like
:exec 'lcd '.fnamemodify(system('chase '.expand('%')),':p:h')
assuming you have the "chase" utility on your box. It's pretty
common utility (it's on each of my boxes here at home, and I
don't remember installing it). The "chase" utility (no relation
to me :) tracks down where a sym-link points, and the other
functions pull in the normalized name, extract the path-portion,
and then "lcd" to that directory.
-tim
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---