Simple tip how to use VIM CWD command.
-
An example on creating a VIM function, coded in ~/.gvimrc, to change current
working directory of VIM.
-
Suppose that a line in text points a directory other than the one from
which VIM was invoked. This functions reads this directory and switches VIM's
working directory.
"change vim pwd
fun! VIMcwd()
let $pini_line = getline(".")
:cd $pini_line
endfun
nmap gwd :call VIMcwd()
|