简体   繁体   中英

Setting Environment Variable in vimrc

I want to set an environment variable in vimrc. The pseudo code of what I want to do is below

if(file x exists in current directory)
path = get absolute path of file x
env = path

How can I do this in vimrc?

Thanks

XY ing the problem a little bit vim supports the :cscope add command (see help entry :h E563 among others) to control which cscope database is currently in use.

That should be a more direct (and more controllable) method of doing what is desired here.

如果只需要影响Vim中的PATH,就很简单:

:let $PATH=...

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM