Skip to content

Instantly share code, notes, and snippets.

@mattn
Created August 27, 2014 08:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/18c27561455271d17158 to your computer and use it in GitHub Desktop.
Save mattn/18c27561455271d17158 to your computer and use it in GitHub Desktop.
diff -r aeafe78fc869 runtime/doc/eval.txt
--- a/runtime/doc/eval.txt Fri Aug 22 13:13:28 2014 +0200
+++ b/runtime/doc/eval.txt Wed Aug 27 17:10:14 2014 +0900
@@ -1095,17 +1095,6 @@
The String value of any environment variable. When it is not defined, the
result is an empty string.
- *expr-env-expand*
-Note that there is a difference between using $VAR directly and using
-expand("$VAR"). Using it directly will only expand environment variables that
-are known inside the current Vim session. Using expand() will first try using
-the environment variables known inside the current Vim session. If that
-fails, a shell will be used to expand the variable. This can be slow, but it
-does expand all variables that the shell knows about. Example: >
- :echo $version
- :echo expand("$version")
-The first one probably doesn't echo anything, the second echoes the $version
-variable (if your shell supports it).
internal variable *expr-variable*
@@ -2911,10 +2900,8 @@
:echo expand("**/README")
<
Expand() can also be used to expand variables and environment
- variables that are only known in a shell. But this can be
- slow, because a shell must be started. See |expr-env-expand|.
- The expanded variable is still handled like a list of file
- names. When an environment variable cannot be expanded, it is
+ variables that are works like a shell. See |expr-env-expand|.
+ When an environment variable cannot be expanded, it is
left unchanged. Thus ":echo expand('$FOOBAR')" results in
"$FOOBAR".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment