Hi, vimmers:

The line 1230 of editing.txt said:

To change to the directory of the current file:
        :cd %:h

This works for Vim 7.0 and before, but not for Vim 7.1. In Vim 7.1 when the
pwd is the same as the directory of current file, the command will fail
with E500. The failure will break the execution of a mapping, if one have a
mapping to do :cd %:h and then continue to do something else.

To reproduce the error, just at anytime, run :cd %:h twice. (I've got
Windows gvim7.1.1, cygwin console vim 7.1.1)

So there's at least two issues IMHO:
1. the line 1230 of editing.txt should be changed to :cd %:p:h
2. somewhere in the document should mention: if we had used :cd %:h in our
mappings or scripts, we should change them into %:p:h after upgraded to vim
7.1.

Or did I missed anything?
--
Sincerely, Pan, Shi Zhu. ext: 2606

Reply via email to