Questions tagged [environment-variables]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
2answers
158 views

Sort output of let or set

How to sort the output of let or get? E.g., I want to sort all global variables containing "python": :filter python let g:
1
vote
0answers
34 views

Disable expansion of environment variables when completing filenames

Let's suppose I have the following environment variable 1| export my__files=$HOME/Documents/MyFiles Now let's suppose I am editing the file main.txt (see content below) 1| foo 2| bar 3| $my__files/...
1
vote
1answer
30 views

Cross-platform way to execute command with clean environment?

A plugin I use executes: silent execute '%!cmd' which fails because of a particular environment variable I have set that deliberately modifies the behaviour of cmd. I can fix it with: silent ...
0
votes
1answer
31 views

Can a vim session use environment variables to specify the path to a file it opens?

Can you edit a vim session, so that it opens a file based on the value of an environment variable instead of an absolute path to a file?
1
vote
1answer
145 views

Neovim-Qt: environment variable TERM not set

Running :checkhealth in NeoVim-Qt (v0.3.5) I get the following report on terminal: ERROR: command failed: infocmp -L infocmp: environment variable TERM not set How can I set the environment variable ...
0
votes
2answers
397 views

How does VIM sets the $VIM environment variable?

I was reading http://vimdoc.sourceforge.net/htmldoc/starting.html#initialization, but couldn't immediately find the answer. Is the $VIM environment variable hardcoded in its binary (not read from a ...
0
votes
1answer
46 views

How to generate a string by concatenating another string with an environment variable

I need to create a variable with a fool folder direct which need to concatenate from a environment variable and the end notes function! MyFoo(arg) let repo=$Project + "/cfora" #Q1 ...
2
votes
0answers
190 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
125 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....
2
votes
1answer
948 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
191 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 ...
1
vote
2answers
155 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
1answer
587 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....
2
votes
1answer
47 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 ...