You are not logged in.
Pages: 1
I'm troubleshooting a problem I posted about in Anyone else experiencing Spell file errors after routine Vim updates?. The short of it seems that VIMRUNTIME is corrupt. The first thing I tried was simply remove and reinstall, but this didn't correct the problem.
$echo $VIMRUNTIME
/usr/share/vim/vim74
$ls /usr/share/vim
vim80
vimfiles
Since VIMRUNTIME is sorted during install, What would be the Archlinux way to fix this environmental variable problem?
Last edited by xtian (2016-11-27 18:14:06)
Offline
What is in your ~/.vimrc and your /etc/vimrc? What is in your .bashrc? Where is VIMRUNTIME being set. Is it even supposed to be set on arch? In The /etc/vimrc you have the line:
runtime! archlinux.vim
This line seems to ber responsible for making vim use the correct arch defaults and the archlinux.vim is replaced one very upgrade. As per: https://git.archlinux.org/svntogit/pack … ckages/vim
" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
" /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime
" you can find below. If you wish to change any of those settings, you should
" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
" everytime an upgrade of the vim packages is performed. It is recommended to
" make changes after sourcing archlinux.vim since it alters the value of the
" 'compatible' option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages.
runtime! archlinux.vim
" If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim'
" Or better yet, read /usr/share/vim/vim80/vimrc_example.vim or the vim manual
" and configure vim to your own liking!
" do not load defaults if ~/.vimrc is missing
"let skip_defaults_vim=1
I do not have any env set for VIMRUNTIME. Strace does not show vim looking/setting VIMRUNTIME either. If I have to guess something has either clogged somewhere else from an unrelated package or some configuration entered in your .vimrc, /etc/vimrc, .bashrc or something else.
Last edited by bryan.paradis (2016-11-03 02:24:27)
Offline
Did you figure this out?
Offline
Sorry for the late reply. Yes. I did figure it out.
The problem was inside of `.bashrc`, where I manually set the `VIMRUNTIME` var. I recall now it was something I was testing after a deep dive into the Vim-verse.
I didn't find the--embarrassingly simple--problem because,
1. at first I thought VIMRUNTIME was set in a vimrc, and the terminal was just reflecting this setting (which is really stupid now that I think of it).
2. my .vimrc file imports two of four other settings files depending on the file type, causing more confusion,
3. I'm making erroneous `grep` statements searching in `.vim`, `/etc/bash.bashrc` and `~/.bashrc` and not searching these files using vim's search (which was how I ultimately found the problem statement).
Just to show it wasn't a total waste of time, @bryan.paradis, your first reply gave me some useful `strace` skills for future app-troubleshooting--thanks Also, VIMs Google Group was useful in helping me understand vim's runtime path variable was this post in VIM google groups. Here a user explains how to analyze the VIMRUNTIME path from inside of vim:
User Gary wrote:
Since you know where your Vim runtime files reside, execute
:echo $VIMRUNTIME
and verify that its value matches your installation's runtime
directory (usually /usr/share/vim/vim80). Your spell files should
be visible with this command:
:!ls $VIMRUNTIME/spell
Then execute
:set rtp?
and verify that it contains the value of $VIMRUNTIME. The
'runtimepath' value might be easier to read with this command:
:echo substitute(&rtp, ',', '\n', 'g')
Hopefully this will help others.
Last edited by xtian (2016-11-27 18:17:29)
Offline
Sorry for the late reply. Yes. I did figure it out.
The problem was inside of `.bashrc`, where I manually set the `VIMRUNTIME` var. I recall now it was something I was testing after a deep dive into the Vim-verse.
The amount of times I have caused myself a headache after some fiddling...
I didn't find the--embarrassingly simple--problem because,
1. at first I thought VIMRUNTIME was set in a vimrc, and the terminal was just reflecting this setting (which is really stupid now that I think of it).
2. my .vimrc file imports two of four other settings files depending on the file type, causing more confusion,
3. I'm making erroneous `grep` statements searching in `.vim`, `/etc/bash.bashrc` and `~/.bashrc` and not searching these files using vim's search (which was how I ultimately found the problem statement).
grepping around for VIMRUNTIME in your home folder is a good idea. May take awhile depending on what is in there.
grep -R VIMRUNTIME ~/
Though pretty much anything weird getting set in all terminals with your user best check bashrc. You can always try ruling out bashrc by running /bin/sh and then checking if you have the same env or problem as it won't run bashrc.
Just to show it wasn't a total waste of time, @bryan.paradis, your first reply gave me some useful `strace` skills for future app-troubleshooting--thanks
Hey your welcome! It's a really useful tool!
Offline
Pages: 1