vim: path和working directory

path设置的目的是为了查找文件,比如说你使用gf指令打不开文件时,就得看看path是否设置正确了

:help path

//查看path
:set path?

// 检查头文件加载情况
:checkpath!

//添加path
:set path+=/sdsd/sdsd

//添加相对路径,注意要以.开头,否则无效
:set path+=./../core

默认的path包含:

  • 当前文件路径,用dot.表示
  • 当前的工作路径,用两个逗号,,表示

working directory

working directory不同于path。path表示查找文件的路径,working directory表示vim的工作路径,往往是打开vim的当前路径。在新建文件,或者打开文件时,会在working directory下操作。

working directory会被默认加到path中,即,, 用两个逗号表示

//查看working directory
:pwd


//设置工作目录
:cd %:h      //跳转到当前文件目录
:lcd %:h     //仅改变当前窗口的目录为当前文件目录
:cd -        //跳转到前一个目录

//自动设置当前文件路径为working directory
set acd     //设置自动跳转到文件路径

:help autochdir
:help :cd


《 “vim: path和working directory” 》 有 4 条评论

  1. Nevertheless, inward rectifier currents remain an important determinant of atrial refractoriness and AF promoting reentrant sources, and the LA increases of inward rectifier currents noted in the present study are likely to shorten LA refractoriness, contributing significantly to the role of the LA in maintaining pAF augmentin and strep throat Pomegranate juice is LIKELY SAFE ffor most people when taken by mouth

  2. cytotec medication I have studied enough about B17 to know that it has great results in terms of treating cancer

  3. priligy review youtube Just a recap who those who I haven t had the pleasure of meeting yet

  4. Determination of ER and co factor recruitment and chromatin modification remodelling in time course studies of genes representative of the different categories, as well as proteomic approaches for identifying factors recruited to ER binding regions in MCF7 and MCF7 Y537S cells would help to more clearly define the mechanisms at work priligy online

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

About Me

一位程序员,会弹吉他,喜欢读诗。
有一颗感恩的心,一位美丽的妻子,两个可爱的女儿
mail: geraldlee0825@gmail.com
github: https://github.com/lisuxiaoqi
medium: https://medium.com/@geraldlee0825