I know ':cd %:p:h ' will change the working directory to the dir for current editing file. But what's the magic in %:p:h ?
Thanks.
oh, I get this link: http://vimdoc.sourceforge.net/htmldoc/cmdline.html#filename-modifiers
:p Make file name a full path.
:h Head of the file name (the last component and any separators removed)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.