On 2011-03-02 Jürgen Krämer <jottka...@googlemail.com> wrote:

> 
> Hi,
> 
> Marco schrieb:
> > On 2011-03-01 Jürgen Krämer <jottka...@googlemail.com> wrote:
> > 
> >>> - Using
> >>> au VimEnter * if expand('%') != ""' | cd %:h | endif
> >>> (note that the double quote must be doubled)
> >>
> >> actually, there were no double quotes in the original command, just
> >> two strings with single quotes: '%' and the empty string.
> > 
> > This line is still wrong. A single quote is missing.
> > 
> > au VimEnter * if expand('%') != '""' | cd %:h | endif
> > 
> > This line solves the problem for me. Thank you. I would like to see this
> > as default behaviour, too.
> 
> please read my mail again; the original line was correct regarding the
> single quotes.
> 
> Your line checks if the current file is not one with a name consisting
> of two double quotes. However unlikely such a name is, the test is wrong.
> And it does not take care of the case where Vim is started without a
> filename.

Sorry, you're right. My fault.


Marco


-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to