diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-06-12 20:35:58 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-06-12 20:35:58 +0200 |
commit | 22971aaa4530d6e8cb2c9c0c19b4f291d8442d61 (patch) | |
tree | 807b31b65f220fe35fc95b05fa9cbb872d99335d /src | |
parent | 6395af8018c523da2339ecf60a457ba70494a9c4 (diff) | |
download | vim-22971aaa4530d6e8cb2c9c0c19b4f291d8442d61.zip |
updated for version 7.3.1178
Problem: Can't put all Vim config files together in one directory.
Solution: Load ~/.vim/vimrc if ~/.vimrc does not exist. (Lech Lorens)
Diffstat (limited to 'src')
-rw-r--r-- | src/gui.c | 12 | ||||
-rw-r--r-- | src/main.c | 4 | ||||
-rw-r--r-- | src/os_amiga.h | 10 | ||||
-rw-r--r-- | src/os_dos.h | 10 | ||||
-rw-r--r-- | src/os_unix.h | 37 | ||||
-rw-r--r-- | src/version.c | 2 |
6 files changed, 63 insertions, 12 deletions
@@ -547,10 +547,14 @@ gui_init() && do_source((char_u *)USR_GVIMRC_FILE2, TRUE, DOSO_GVIMRC) == FAIL #endif +#ifdef USR_GVIMRC_FILE3 + && do_source((char_u *)USR_GVIMRC_FILE3, TRUE, + DOSO_GVIMRC) == FAIL +#endif ) { -#ifdef USR_GVIMRC_FILE3 - (void)do_source((char_u *)USR_GVIMRC_FILE3, TRUE, DOSO_GVIMRC); +#ifdef USR_GVIMRC_FILE4 + (void)do_source((char_u *)USR_GVIMRC_FILE4, TRUE, DOSO_GVIMRC); #endif } @@ -593,6 +597,10 @@ gui_init() && fullpathcmp((char_u *)USR_GVIMRC_FILE3, (char_u *)GVIMRC_FILE, FALSE) != FPC_SAME #endif +#ifdef USR_GVIMRC_FILE4 + && fullpathcmp((char_u *)USR_GVIMRC_FILE4, + (char_u *)GVIMRC_FILE, FALSE) != FPC_SAME +#endif ) do_source((char_u *)GVIMRC_FILE, TRUE, DOSO_GVIMRC); diff --git a/src/main.c b/src/main.c index b524c7eda..9c11b432a 100644 --- a/src/main.c +++ b/src/main.c @@ -2981,6 +2981,10 @@ source_startup_scripts(parmp) && do_source((char_u *)USR_VIMRC_FILE3, TRUE, DOSO_VIMRC) == FAIL #endif +#ifdef USR_VIMRC_FILE4 + && do_source((char_u *)USR_VIMRC_FILE4, TRUE, + DOSO_VIMRC) == FAIL +#endif && process_env((char_u *)"EXINIT", FALSE) == FAIL && do_source((char_u *)USR_EXRC_FILE, FALSE, DOSO_NONE) == FAIL) { diff --git a/src/os_amiga.h b/src/os_amiga.h index 69a1523e4..bcdba32ad 100644 --- a/src/os_amiga.h +++ b/src/os_amiga.h @@ -158,7 +158,10 @@ typedef long off_t; # define USR_VIMRC_FILE2 "home:.vimrc" #endif #ifndef USR_VIMRC_FILE3 -# define USR_VIMRC_FILE3 "$VIM/.vimrc" +# define USR_VIMRC_FILE3 "home:vimfiles:vimrc" +#endif +#ifndef USR_VIMRC_FILE4 +# define USR_VIMRC_FILE4 "$VIM/.vimrc" #endif #ifndef EVIM_FILE # define EVIM_FILE "$VIMRUNTIME/evim.vim" @@ -171,7 +174,10 @@ typedef long off_t; # define USR_GVIMRC_FILE2 "home:.gvimrc" #endif #ifndef USR_GVIMRC_FILE3 -# define USR_GVIMRC_FILE3 "$VIM/.gvimrc" +# define USR_GVIMRC_FILE3 "home:vimfiles:gvimrc" +#endif +#ifndef USR_GVIMRC_FILE4 +# define USR_GVIMRC_FILE4 "$VIM/.gvimrc" #endif #ifdef FEAT_VIMINFO diff --git a/src/os_dos.h b/src/os_dos.h index 103cded5a..17246d4f7 100644 --- a/src/os_dos.h +++ b/src/os_dos.h @@ -20,7 +20,10 @@ # define USR_VIMRC_FILE "$HOME\\_vimrc" #endif #ifndef USR_VIMRC_FILE2 -# define USR_VIMRC_FILE2 "$VIM\\_vimrc" +# define USR_VIMRC_FILE2 "$HOME\\vimfiles\\vimrc" +#endif +#ifndef USR_VIMRC_FILE3 +# define USR_VIMRC_FILE3 "$VIM\\_vimrc" #endif #ifndef EVIM_FILE # define EVIM_FILE "$VIMRUNTIME\\evim.vim" @@ -41,7 +44,10 @@ # define USR_GVIMRC_FILE "$HOME\\_gvimrc" # endif # ifndef USR_GVIMRC_FILE2 -# define USR_GVIMRC_FILE2 "$VIM\\_gvimrc" +# define USR_GVIMRC_FILE2 "$HOME\\vimfiles\\gvimrc" +# endif +# ifndef USR_GVIMRC_FILE3 +# define USR_GVIMRC_FILE3 "$VIM\\_gvimrc" # endif # ifndef SYS_MENU_FILE # define SYS_MENU_FILE "$VIMRUNTIME\\menu.vim" diff --git a/src/os_unix.h b/src/os_unix.h index 3c9224cd2..02eeafc96 100644 --- a/src/os_unix.h +++ b/src/os_unix.h @@ -294,11 +294,24 @@ typedef struct dsc$descriptor DESC; # endif #endif -#if !defined(USR_VIMRC_FILE2) && defined(OS2) -# define USR_VIMRC_FILE2 "$VIM/.vimrc" + +#if !defined(USR_EXRC_FILE2) +# ifdef OS2 +# define USR_VIMRC_FILE2 "$HOME/vimfiles/vimrc" +# else +# ifdef VMS +# define USR_VIMRC_FILE2 "sys$login:vimfiles:vimrc" +# else +# define USR_VIMRC_FILE2 "~/.vim/vimrc" +# endif +# endif +#endif + +#if !defined(USR_VIMRC_FILE3) && defined(OS2) +# define USR_VIMRC_FILE3 "$VIM/.vimrc" #endif -#if !defined(USR_VIMRC_FILE2) && defined(VMS) -# define USR_VIMRC_FILE2 "sys$login:_vimrc" +#if !defined(USR_VIMRC_FILE3) && defined(VMS) +# define USR_VIMRC_FILE3 "sys$login:_vimrc" #endif #ifndef USR_GVIMRC_FILE @@ -309,9 +322,21 @@ typedef struct dsc$descriptor DESC; # endif #endif +#ifndef USR_GVIMRC_FILE2 +# ifdef OS2 +# define USR_GVIMRC_FILE2 "$HOME/vimfiles/gvimrc" +# else +# ifdef VMS +# define USR_GVIMRC_FILE2 "sys$login:vimfiles:gvimrc" +# else +# define USR_GVIMRC_FILE2 "~/.vim/gvimrc" +# endif +# endif +#endif + #ifdef VMS -# ifndef USR_GVIMRC_FILE2 -# define USR_GVIMRC_FILE2 "sys$login:_gvimrc" +# ifndef USR_GVIMRC_FILE3 +# define USR_GVIMRC_FILE3 "sys$login:_gvimrc" # endif #endif diff --git a/src/version.c b/src/version.c index f42c31f65..32a81cfe2 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1178, +/**/ 1177, /**/ 1176, |