How to set working/current directory in Vim?

前端 未结 6 971
忘掉有多难
忘掉有多难 2020-12-04 09:42

So when I want to create a new file by using the :e command I don\'t want to specify the whole path, just the new filename. Can it be done?

6条回答
  •  旧时难觅i
    2020-12-04 10:48

    With netrw: in addition to pressing the c key to set the current directory, you may also put:

    let g:netrw_keepdir= 0
    

    in your .vimrc; this means that netrw will keep the browsing directory the same as the current directory.

提交回复
热议问题