Skip to main content

Questions tagged [variables]

For questions about vimscript variables, their scopes, and usages.

4 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
862 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' ...
Fisher's user avatar
  • 1,086
1 vote
0 answers
125 views

why is b:changedtick never zero?

As the Title states b:changedtick is never zero. No plugin or special setting seems to be involved. Even : vim -u NONE -U NONE :echo b:changedtick returns a value != 0 The same happens if I start ...
Naumann's user avatar
  • 2,759
1 vote
0 answers
798 views

Invoking a command with a defined variable results in "undefined variable"

I'm trying to integrate opam-user-setup's output with vim-plug. I've produced the following: let s:opam_share_dir = system("opam config var share") let s:opam_share_dir = substitute(s:opam_share_dir, ...
ELLIOTTCABLE's user avatar
0 votes
0 answers
132 views

Save and restore a variable across launches

I wanna save the state of a variable (say, background) such that the state is restored next time I start vim. More in detail, it should work like this: I set background to either dark or light. I ...
srs's user avatar
  • 101