Sunday, December 29, 2013

Re: Where is my system-wide init file?

Tony, thank you for your detailed answer. By following your advice, I
have tracked down where Vim looks for its system-wide init file. It
is either in /etc/vim/ or in /usr/share/vim/, but I still don't
understand why Vim looks there, considering that no Vim-related
environment variable points there.

Also, could it be that I'm experiencing frequent GVim crashes because
my installation is not configured properly? There are no environment
variable that are related to Vim. Should I create any?

I'm answering your probing questions in case there are other things
that I'm missing.

On Sunday, December 29, 2013 12:43:43 PM UTC+1,
Tony Mechelynck wrote: > 1. Try "ls -l" on some of these files (in
subfolders of /etc and of > > /usr/share) to see if any of them is a
soft link. (Seeing if it's a hard > > link is less obvious). Or maybe
/home/egarrulo or > > /home/egarrulo/bin/vim/vim-7.4.280/share are
soft links?

Yes, the init files in /usr/share link to the same files in /etc.

/home/egarrulo/bin/vim/vim-7.4.280 is the folder where I have
installed Vim, after building it with:

./configure --prefix=/home/egarrulo/bin/vim/vim-7.4.280

I did so to avoid clashing with the Vim version that comes with my
distro.

> 2. Maybe there is another Vim (later in the $PATH) on your system?

Yes, there is: /usr/bin/vim. It is the build that comes with my distro.

Thank you for making me learn the "type" command. Cool! :-)

> The system-wide vimrc for that copy of Vim, sourced before the user's
>
> vimrc, is $VIM/vimrc — with whatever $VIM may be when that user runs
>
> Vim.

$VIM is empty.


> You seem to find that $VIM is $HOME/vim/vim-7.4.280/share/vim, for
>
> another user it would probably not be a subfolder of _your_ $HOME.
>
>
>

> Also, I wonder why you have a "vim-7.4.280" link in that path. Do you
>
> change that at every patchlevel? Also, where did you get that "280"
>
> from? The current patchlevel is only 7.4.131.

Indeed, at startup, Vim says it is version 7.4.131.

I didn't know about the patchlevel when I compiled Vim. I got the
version from the "version.h" file:

#define VIM_VERSION_MAJOR 7
#define VIM_VERSION_MINOR 4
#define VIM_VERSION_BUILD 280

>
>
>
> For the Vim that I compile for my home computer, I use Vim's defaults,
>
> namely:
>
>
>
> $VIM = /usr/local/share/vim
>
> $VIMRUNTIME = $VIM/vim74 (at version 7.4)

I did the same. I only used the "--prefix" option with "./configure".

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment