export
VIMRUNTIME="$HOME/.config/vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/.config/vim/after"
Regards,
Chip Campbell
> Problem is that some people like my wish for a native solution)))
> $VIMRUNTIME is fun, but there already is $XDG_CONFIG_HOME for all.
The freedesktop.org initiative was launched in 2000 while Vim was
originally released in 1991 and the freedesktop.org initiative only
applies to a small percentage of Vim users because Vim has been ported
to dozens of platforms. Why do you feel the default Vim configuration
should respect $XDG_CONFIG_HOME? (or am I misinterpreting you?)
- Peter Odding
I took it to mean that there should be an easy way to configure Vim (at
compile time) to default to using $XDG_CONFIG_HOME directories. I sent
a patch to that effect (minus the configuration portion -- wasn't sure
if it made more sense to call it --with-xdg-directories or
--enable-xdg-directories -- probably the latter?).
As to the initial problem, I'm pretty sure there's a way to configure it
to use $XDG_CONFIG_HOME already, but it seems better to have a way to
"bundle" those options, since more and more Linux distros are moving
toward these recommendations.
But, I agree 100% that it should *not* be the default configuration.
Alex, you might try doing something like what my patch is doing in code,
if you want this now. Something along the lines of:
$ CPP_FLAGS="-DUSR_VIMRC_FILE=\"\$XDG_CONFIG_HOME/vim/vimrc\" -DUSR_EXRC_FILE=\"\$XDG_CONFIG_HOME/vim/exrc\"" ./configure [various options] && make
--
Best,
Ben
You can use .vimrc in Windows just fine, and vim will pick it up with
absolutely no configuration on your part. The only reason it looks for
_vimrc is because of a stupid decision by MS to not allow Explorer to
create files with a leading "." .
Note that Windows vim will NOT look for ~/.vim by default though --
this is a bigger issue for those using the same config on Windows and
other platforms. You have to change rtp near the top of your .vimrc.
And, of course, if .vimrc was inside of .vim then it would be an
impossible situation.
Tom
> Note that Windows vim will NOT look for ~/.vim by default though --
> this is a bigger issue for those using the same config on Windows and
> other platforms. You have to change rtp near the top of your .vimrc.
> And, of course, if .vimrc was inside of .vim then it would be an
> impossible situation.
I don't think Vim's use of ~/vimfiles on Windows and ~/.vim on Unix
should be an issue when using the same configuration on both OSs.
Vim automatically sets 'rtp' as needed for either OS. The ~/.vimrc
or ~/_vimrc doesn't need to know where plugins are located and the
plugins don't need to know, either. Vim would be able to find
~/vimfiles/vimrc or ~/.vim/vimrc as easily as it finds the user's
plugins.
I'm currently sharing the same configuration among two Windows
machines and two Linux machines and the only issue I've had is with
the Windows Vim thinking that RCS/*.vim,v files should be sourced as
plugins. I don't do any modification of 'rtp'.
I also have Cygwin running on one of those Windows boxes and for
that, I keep the real plugins in ~/vimfiles and just have a Cygwin
symbolic link from ~/.vim to ~/vimfiles.
Regards,
Gary
Oh, but it will: see the following a few lines below :help _vimrc
> Note: For Unix, OS/2 and Amiga, when ".vimrc" does not exist,
> "_vimrc" is also tried, in case an MS-DOS compatible file
> system is used. For MS-DOS and Win32 ".vimrc" is checked
> after "_vimrc", in case long file names are used.
> Note: For MS-DOS and Win32, "$HOME" is checked first. If no
> "_vimrc" or ".vimrc" is found there, "$VIM" is tried.
IOW, on Unix ~/.vimrc is looked for first, and ~/_vimrc if it isn't
found. On Windows the order is ~/_vimrc, ~/.vimrc, $VIM/_vimrc,
$VIM/.vimrc (and if there is also a $VIM/vimrc it is a "system vimrc",
normally loaded before, not instead of, the user's vimrc on any system).
> You have to change rtp near the top of your .vimrc.
> And, of course, if .vimrc was inside of .vim then it would be an
> impossible situation.
>
> Tom
>
Best regards,
Tony.
--
"Every man has his price. Mine is $3.95."
How widespread is this? Is this something new or established?
It's always possible to do things differently, but usually doing it the
old way is better so long as it's not running into real problems. Also,
more compilation options make things more complicated.
--
A special law prohibits unmarried women from parachuting on Sunday or she
shall risk arrest, fine, and/or jailing.
[real standing law in Florida, United States of America]
/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
>
> Ben Haskell wrote:
>
>> Freedesktop defines some commonly, but certainly-not-universally used
>> directories for configuration (rather than using $HOME/.file, it's
>> generally, $XDG_CONFIG_HOME/appname/file). This is a very rough
>> first draft of using those names if XDG_DIRECTORIES is defined.
>
> How widespread is this?
Depends on what's on your system. It's up to applications to use the
dirs or not.
On my Gentoo system, I've got 124 ~/.{application}/ dirs and 18
~/.{application}rc files, but I have 22 ~/.config/{application}/ dirs.
At work, it's 89, 19, and 16.
The relevant Freedesktop.org standard(s) have backing from GNOME, KDE,
and Xfce, but I don't tend to use any of those for my WM, so I tend not
to have many extra GNOME/KDE programs installed.
The only things I use regularly that use the XDG directories are XMMS2
and Chrome/Chromium. But I don't think I'm a typical Linux user (based
solely on my choice of WM: wmii).
Qt- and GNOME-based apps appear to use it.
> Is this something new or established?
Maybe becoming established?
v 0.5 was 2004.
v 0.7 (current) was 2010.
> It's always possible to do things differently, but usually doing it
> the old way is better so long as it's not running into real problems.
> Also, more compilation options make things more complicated.
Right.
--
Best,
Ben
With this patch, if $XDG_CONFIG_HOME isn't set (which is the common
case) Vim would need to know to use ~/.config. This could likely be
done like $VIM is, where the environment is checked first and a default
used if it isn't set.
--
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jame...@jamessan.com>