Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdbd7f45

Browse files
vim-patch:2190036: runtime(doc): Add environment variable expansion note to options (#36675)
Add "Environment variables are expanded |:set_env|" documentation tooptions that have the P_EXPAND flag but were missing this note.Updated options:- 'cdpath'- 'dictionary'- 'mkspellmem'- 'packpath'- 'runtimepath'- 'spellfile'- 'spellsuggest'- 'thesaurus'- 'ttytype'- 'undodir'- 'verbosefile'- 'viewdir'- 'viminfofile'These options support environment variable expansion in their values(e.g., $HOME, $USER) but the documentation didn't explicitly mentionthis capability. This brings their documentation in line with otheroptions like backupdir, directory, and makeprg that already includethis note.closes:vim/vim#18791vim/vim@2190036Co-authored-by: Alex Plate <AlexPl292@gmail.com>
1 parent71ce303 commitdbd7f45

File tree

3 files changed

+50
-14
lines changed

3 files changed

+50
-14
lines changed

‎runtime/doc/options.txt‎

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,8 @@ A jump table for the options with a short description can be found at |Q_op|.
12881288
a modified version of the following command in your vimrc file to
12891289
override it: >vim
12901290
let &cdpath = ',' .. substitute(substitute($CDPATH, '[, ]', '\\\0', 'g'), ':', ',', 'g')
1291-
<This option cannot be set from a|modeline| or in the|sandbox|, for
1291+
<Environment variables are expanded|:set_env|.
1292+
This option cannot be set from a|modeline| or in the|sandbox|, for
12921293
security reasons.
12931294
(parts of'cdpath' can be passed to the shell to expand file names).
12941295

@@ -2146,6 +2147,7 @@ A jump table for the options with a short description can be found at |Q_op|.
21462147
To include a comma in a file name precede it with a backslash. Spaces
21472148
after a comma are ignored, otherwise spaces are included in the file
21482149
name. See|option-backslash| about using backslashes.
2150+
Environment variables are expanded|:set_env|.
21492151
This has nothing to do with the|Dictionary| variable type.
21502152
Where to find a list of words?
21512153
- BSD/macOS include the "/usr/share/dict/words" file.
@@ -4452,7 +4454,7 @@ A jump table for the options with a short description can be found at |Q_op|.
44524454
set mkspellmem=900000,3000,800
44534455
<If you have less than 512 Mbyte|:mkspell| may fail for some
44544456
languages, no matter what you set'mkspellmem' to.
4455-
4457+
Environment variables are expanded|:set_env|.
44564458
This option cannot be set from a|modeline| or in the|sandbox|, for
44574459
security reasons.
44584460

@@ -4775,6 +4777,7 @@ A jump table for the options with a short description can be found at |Q_op|.
47754777
global
47764778
Directories used to find packages.
47774779
See|packages| and|packages-runtimepath|.
4780+
Environment variables are expanded|:set_env|.
47784781
This option cannot be set from a|modeline| or in the|sandbox|, for
47794782
security reasons.
47804783

@@ -5231,6 +5234,9 @@ A jump table for the options with a short description can be found at |Q_op|.
52315234
to find files which add to distributed runtime files.
52325235

52335236
With|--clean| the home directory entries are not included.
5237+
Environment variables are expanded|:set_env|.
5238+
This option cannot be set from a|modeline| or in the|sandbox|, for
5239+
security reasons.
52345240

52355241
*'scroll'**'scr'*
52365242
'scroll''scr'number(default half the window height)
@@ -5532,6 +5538,7 @@ A jump table for the options with a short description can be found at |Q_op|.
55325538
When equal to "NONE" no shada file will be read or written.
55335539
This option can be set with the|-i| command line flag. The|--clean|
55345540
command line flag sets it to "NONE".
5541+
Environment variables are expanded|:set_env|.
55355542
This option cannot be set from a|modeline| or in the|sandbox|, for
55365543
security reasons.
55375544

@@ -6073,6 +6080,7 @@ A jump table for the options with a short description can be found at |Q_op|.
60736080
name if you want to. However, it will then only be used when
60746081
'spellfile' is set to it, for entries in'spelllang' only files
60756082
without region name will be found.
6083+
Environment variables are expanded|:set_env|.
60766084
This option cannot be set from a|modeline| or in the|sandbox|, for
60776085
security reasons.
60786086

@@ -6194,7 +6202,7 @@ A jump table for the options with a short description can be found at |Q_op|.
61946202
Only one of "best", "double" or "fast" may be used. The others may
61956203
appear several times in any order. Example: >vim
61966204
set sps=file:~/.config/nvim/sugg,best,expr:MySuggest()
6197-
<
6205+
<Environment variables are expanded|:set_env|.
61986206
This option cannot be set from a|modeline| or in the|sandbox|, for
61996207
security reasons.
62006208

@@ -6873,8 +6881,9 @@ A jump table for the options with a short description can be found at |Q_op|.
68736881
name. See|option-backslash| about using backslashes. The use of
68746882
|:set+=| and|:set-=| is preferred when adding or removing directories
68756883
from the list. This avoids problems when a future version uses
6876-
another default. Backticks cannot be used in this option for security
6877-
reasons.
6884+
another default.
6885+
Environment variables are expanded|:set_env|.
6886+
Backticks cannot be used in this option for security reasons.
68786887

68796888
*'thesaurusfunc'**'tsrfu'*
68806889
'thesaurusfunc''tsrfu'string(default "")
@@ -7009,6 +7018,7 @@ A jump table for the options with a short description can be found at |Q_op|.
70097018
undo file that exists is used. When it cannot be read an error is
70107019
given, no further entry is used.
70117020
See|undo-persistence|.
7021+
Environment variables are expanded|:set_env|.
70127022
This option cannot be set from a|modeline| or in the|sandbox|, for
70137023
security reasons.
70147024

@@ -7162,13 +7172,15 @@ A jump table for the options with a short description can be found at |Q_op|.
71627172
Setting'verbosefile' to a new value is like making it empty first.
71637173
The difference with|:redir| is that verbose messages are not
71647174
displayed when'verbosefile' is set.
7175+
Environment variables are expanded|:set_env|.
71657176
This option cannot be set from a|modeline| or in the|sandbox|, for
71667177
security reasons.
71677178

71687179
*'viewdir'**'vdir'*
71697180
'viewdir''vdir'string(default "$XDG_STATE_HOME/nvim/view//")
71707181
global
71717182
Name of the directory where to store files for|:mkview|.
7183+
Environment variables are expanded|:set_env|.
71727184
This option cannot be set from a|modeline| or in the|sandbox|, for
71737185
security reasons.
71747186

‎runtime/lua/vim/_meta/options.lua‎

Lines changed: 16 additions & 4 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎src/nvim/options.lua‎

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,8 @@ local options = {
10801080
a modified version of the following command in your vimrc file to
10811081
override it: >vim
10821082
let &cdpath = ',' .. substitute(substitute($CDPATH, '[, ]', '\\\0', 'g'), ':', ',', 'g')
1083-
<This option cannot be set from a |modeline| or in the |sandbox|, for
1083+
<Environment variables are expanded |:set_env|.
1084+
This option cannot be set from a |modeline| or in the |sandbox|, for
10841085
security reasons.
10851086
(parts of 'cdpath' can be passed to the shell to expand file names).
10861087
]=],
@@ -2300,6 +2301,7 @@ local options = {
23002301
To include a comma in a file name precede it with a backslash. Spaces
23012302
after a comma are ignored, otherwise spaces are included in the file
23022303
name. See |option-backslash| about using backslashes.
2304+
Environment variables are expanded |:set_env|.
23032305
This has nothing to do with the |Dictionary| variable type.
23042306
Where to find a list of words?
23052307
- BSD/macOS include the "/usr/share/dict/words" file.
@@ -5892,7 +5894,7 @@ local options = {
58925894
set mkspellmem=900000,3000,800
58935895
<If you have less than 512 Mbyte |:mkspell| may fail for some
58945896
languages, no matter what you set 'mkspellmem' to.
5895-
5897+
Environment variables are expanded |:set_env|.
58965898
This option cannot be set from a |modeline| or in the |sandbox|, for
58975899
security reasons.
58985900
]=],
@@ -6480,6 +6482,7 @@ local options = {
64806482
desc=[=[
64816483
Directories used to find packages.
64826484
See |packages| and |packages-runtimepath|.
6485+
Environment variables are expanded |:set_env|.
64836486
This option cannot be set from a |modeline| or in the |sandbox|, for
64846487
security reasons.
64856488
]=],
@@ -7209,6 +7212,9 @@ local options = {
72097212
to find files which add to distributed runtime files.
72107213
72117214
With |--clean| the home directory entries are not included.
7215+
Environment variables are expanded |:set_env|.
7216+
This option cannot be set from a |modeline| or in the |sandbox|, for
7217+
security reasons.
72127218
]=],
72137219
expand='nodefault',
72147220
full_name='runtimepath',
@@ -7660,6 +7666,7 @@ local options = {
76607666
When equal to "NONE" no shada file will be read or written.
76617667
This option can be set with the |-i| command line flag. The |--clean|
76627668
command line flag sets it to "NONE".
7669+
Environment variables are expanded |:set_env|.
76637670
This option cannot be set from a |modeline| or in the |sandbox|, for
76647671
security reasons.
76657672
]=],
@@ -8501,6 +8508,7 @@ local options = {
85018508
name if you want to. However, it will then only be used when
85028509
'spellfile' is set to it, for entries in 'spelllang' only files
85038510
without region name will be found.
8511+
Environment variables are expanded |:set_env|.
85048512
This option cannot be set from a |modeline| or in the |sandbox|, for
85058513
security reasons.
85068514
]=],
@@ -8661,7 +8669,7 @@ local options = {
86618669
Only one of "best", "double" or "fast" may be used. The others may
86628670
appear several times in any order. Example: >vim
86638671
set sps=file:~/.config/nvim/sugg,best,expr:MySuggest()
8664-
<
8672+
<Environment variables are expanded |:set_env|.
86658673
This option cannot be set from a |modeline| or in the |sandbox|, for
86668674
security reasons.
86678675
]=],
@@ -9627,8 +9635,9 @@ local options = {
96279635
name. See |option-backslash| about using backslashes. The use of
96289636
|:set+=| and |:set-=| is preferred when adding or removing directories
96299637
from the list. This avoids problems when a future version uses
9630-
another default. Backticks cannot be used in this option for security
9631-
reasons.
9638+
another default.
9639+
Environment variables are expanded |:set_env|.
9640+
Backticks cannot be used in this option for security reasons.
96329641
]=],
96339642
expand=true,
96349643
full_name='thesaurus',
@@ -9860,6 +9869,7 @@ local options = {
98609869
undo file that exists is used. When it cannot be read an error is
98619870
given, no further entry is used.
98629871
See |undo-persistence|.
9872+
Environment variables are expanded |:set_env|.
98639873
This option cannot be set from a |modeline| or in the |sandbox|, for
98649874
security reasons.
98659875
@@ -10090,6 +10100,7 @@ local options = {
1009010100
Setting 'verbosefile' to a new value is like making it empty first.
1009110101
The difference with |:redir| is that verbose messages are not
1009210102
displayed when 'verbosefile' is set.
10103+
Environment variables are expanded |:set_env|.
1009310104
This option cannot be set from a |modeline| or in the |sandbox|, for
1009410105
security reasons.
1009510106
]=],
@@ -10106,6 +10117,7 @@ local options = {
1010610117
defaults='',
1010710118
desc=[=[
1010810119
Name of the directory where to store files for |:mkview|.
10120+
Environment variables are expanded |:set_env|.
1010910121
This option cannot be set from a |modeline| or in the |sandbox|, for
1011010122
security reasons.
1011110123
]=],

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp