summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/gui.txt14
-rw-r--r--src/gui.c12
-rw-r--r--src/main.c4
-rw-r--r--src/os_amiga.h10
-rw-r--r--src/os_dos.h10
-rw-r--r--src/os_unix.h37
-rw-r--r--src/version.c2
7 files changed, 73 insertions, 16 deletions
diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt
index b2e6a0c4c..6b46c9f02 100644
--- a/runtime/doc/gui.txt
+++ b/runtime/doc/gui.txt
@@ -93,10 +93,16 @@ and initialize other things that you may want to set up differently from the
terminal version.
Recommended place for your personal GUI initializations:
- Unix $HOME/.gvimrc
- OS/2 $HOME/.gvimrc or $VIM/.gvimrc
- MS-DOS and Win32 $HOME/_gvimrc or $VIM/_gvimrc
- Amiga s:.gvimrc or $VIM/.gvimrc
+ Unix $HOME/.gvimrc or $HOME/.vim/gvimrc
+ OS/2 $HOME/.gvimrc, $HOME/vimfiles/gvimrc
+ or $VIM/.gvimrc
+ MS-DOS and Win32 $HOME/_gvimrc, $HOME/vimfiles/gvimrc
+ or $VIM/_gvimrc
+ Amiga s:.gvimrc, home:.gvimrc, home:vimfiles:gvimrc
+ or $VIM/.gvimrc
+
+The personal initialization files are searched in the order specified above
+and only the first one that is found is read.
There are a number of options which only have meaning in the GUI version of
Vim. These are 'guicursor', 'guifont', 'guipty' and 'guioptions'. They are
diff --git a/src/gui.c b/src/gui.c
index 0bb0422cc..b9b73a3fd 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -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,