Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [environment-variables]

The tag has no usage guidance.

0
votes
0answers
25 views

set a ctermfg/bg in colorscheme with bash environment variable

in .bashrc export __tmux_bg_inactive='235' in my colorscheme file: hi TabLineFill ctermbg=$__tmux_bg_inactive This results in an error: Error detected while processing /Users/jerric/.vim/colors/...
1
vote
0answers
60 views

Why gf is not working with variable?

If there is no variable in path, gf can open the file. Added sfname+={,} to .vimrc to support ${VARIABLE}. :!echo ${VAR}/test/file can correctly print full path with ${VAR} expanded. But if run 'gf' ...
0
votes
1answer
68 views

How do you fix the Home and End keys producing 'H' and 'F'?

I recently was doing some Vim editing and noticed the behavior was very different for two important keys. The only difference I made was I started bash using: env -i bash --init-script ~/.bashrc....
1
vote
1answer
528 views

How to set the vim path to your bash PATH?

I'd like my $PATH to be available to vim when running commands with !. How do I set vim's set path= to my environment variable $PATH?
1
vote
1answer
145 views

How to open a GPG encrypted file without having to choose the GPG recipient with the gnupg plugin?

I want to edit a GPG encrypted file file.asc without having to split the window to enter the recipient. The recipient can be set in the vimrc. :let g:GPGDefaultRecipients='<key ID>' How would ...
2
votes
2answers
104 views

Using get with environment variable namespace

I want to use get with the environment variable namespace, so instead of this in the global namespace: let vim_data_dir = get(g:, 'vim_data_dir', "default value if not set") Something like this, in ...
0
votes
0answers
358 views

Execute curl command with variable interpolation

I'm trying to adapt this known-working snippet for installing vim-plug: if empty(glob('~/.vim/autoload/plug.vim')) silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw....
3
votes
1answer
39 views

Is there a platform independent way to use “${ENVVAR}more_text” in vim?

I just discovered that I am able to use ${ENVVAR}more_text in a vim installation on Unix, but not if installed on Windows. In Unix, I did in a shell: export ABC=/tmp/ echo foo>${ABC}foo gvim ...