Problem: hard to guess the Vim Runtime Directory
Solution: Set the $MYVIMDIR environment variable to the users
personal runtime directory (e.g. ~/.vim on Linux)
closes: #15576
Signed-off-by: Christian Brabandt <cb@256bit.org>
The original shell command could set the VIMRUNTIME variable to an
invalid path.
- since v9.0.0592 trailing spaces were typically added making the
path invalid. (I observed that spaces were added if the length of
the path wasn't equal to one less than an integer multiple of the
number of display columns.)
- newline character/s would be added, making the path invalid, if
the path was longer than the number of display columns.
The new command is shorter than the original command.
closes: #15184
Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This makes it more consistent with :h vimrc and is more correct (in the
case when $XDG_CONFIG_HOME has been defined to point to some other
location.
fixes: #15108
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: No support for using $XDG_CONFIG_HOME
Solution: optionally source $XDG_CONFIG_HOME/vim/vimrc
(Luca Saccarola)
fixes: #2034closes: #14182
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Also:
- Insert some missing words;
- Strive for consistency with capitalisation of words;
- Improve shell alias examples.
The gvim words were left alone for now, but they deserve to
be treated like proper names, GVim or GUI Vim, unless these
refer to executable filenames (on *nix systems).
closes: #14194
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: [security] disallow setting env in restricted mode
Solution: Setting environment variables in restricted mode could
potentially be used to execute shell commands. Disallow this.
restricted mode: disable allow setting of environment variables
Setting environment variables in restricted mode, may have some unwanted
consequences. So, for example by setting $GCONV_PATH in restricted mode
and then calling the iconv() function, one may be able to execute some
unwanted payload, because the `iconv_open()` function internally uses
the `$GCONV_PATH` variable to find its conversion data.
So let's disable setting environment variables, even so this is no
complete protection, since we are not clearing the existing environment.
I tried a few ways but wasn't successful :(
One could also argue to disable the iconv() function completely in
restricted mode, but who knows what other API functions can be
influenced by setting some other unrelated environment variables.
So let's leave it as it is currently.
closes: #13394
See: https://huntr.com/bounties/b0a2eda1-459c-4e36-98e6-0cc7d7faccfe/
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Test_cq_zero_exmode fails without channel feature
Solution: Make the test check the channel feature
closes: #13365
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: inconsistent feature description
Solution: delete old mentioned feature sets small and big
The may however still be mentioned for historical reasons. e.g. The
last Amiga built version is for Vim6.2 and is still a big version.
closes: #13273
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: RestorerZ <restorer@mail2k.ru>
Problem: It is not easy to see what client-server commands are doing.
Solution: Add channel log messages if ch_log() is available. Move the
channel logging and make it available with the +eval feature.
Problem: There is no way to start logging very early in startup.
Solution: Add the --log argument. Include the date in the start message in
the log file. Avoid a duplicate message when forking. Log an
executed shell command.
Problem: OS/2 and MS-DOS are still mentioned, even though support was
removed long ago.
Solution: Update documentation. (Yegappan Lakshmanan, closes#5368)