This is not a answer to your question, but a follow up on you comment:
From the above methods, I found $VIM
to be /usr/share/vim
. So following
the :version
output, I would think that the system vimrc
file is
/usr/share/vim/vimrc
. However, $ ll /usr/share/vim/vimrc
shows it's
point to /usr/share/vim/vimrc -> /etc/vim/vimrc
, not
/etc/vim/vimrc.tiny
, and there is no mention of .tiny
in
/etc/vim/vimrc
. So it's not still unclear how the .tiny
file is used.
You have /etc/vim/vimrc
and /etc/vim/vimrc.tiny
, because you installed multiple vim-related packages on Ubuntu.
/etc/vim/vimrc.tiny
is from the package "vim-tiny".
/etc/vim/vimrc
is from the package "vim-common"
In a default setup of Ubuntu only "vim-tiny" is installed. This is a small Vim build with limited features (e.g. no syntax highlighting). This package also created the file /usr/share/vim/vimrc
as a symbolic link to /etc/vim/vimrc.tiny
.
Later on a "bigger" Vim package was installed, like "gvim". This has a dependency on "vim-common". The package "vim-common" contains all the runtime files (syntax highlighting etc). This package also creates the file /usr/share/vim/vimrc
, but this time as a symbolic link to /etc/vim/vimrc
.
So: The file /etc/vim/vimrc.tiny
is from the package "vim-tiny" and is not used anymore. The package is still installed and you can call the executable with
$ vim.tiny
To see all installed vim-related packages execute
$ dpkg -l \*vim\*
echo $VIM
:echo $VIM
from within Vim printsE319: Sorry, the command is not available in this version
, try:!echo $VIM
.:e $VIM/vimrc
and use<c-g>
to find its path. Alternatively, if:shell
works, check there the value of$VIM
$VIM
to be/usr/share/vim
. So following the:verson
output, I would think that the system vimrc file is/usr/share/vim/vimrc
. However,$ ll /usr/share/vim/vimrc
shows it's point to/usr/share/vim/vimrc -> /etc/vim/vimrc
, not/etc/vim/vimrc.tiny
, and there is no mention of.tiny
in/etc/vim/vimrc
. So it's not still unclear how the.tiny
file is used.