]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.1178 v7.3.1178
authorBram Moolenaar <Bram@vim.org>
Wed, 12 Jun 2013 18:35:58 +0000 (20:35 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 12 Jun 2013 18:35:58 +0000 (20:35 +0200)
Problem:    Can't put all Vim config files together in one directory.
Solution:   Load ~/.vim/vimrc if ~/.vimrc does not exist. (Lech Lorens)

runtime/doc/gui.txt
src/gui.c
src/main.c
src/os_amiga.h
src/os_dos.h
src/os_unix.h
src/version.c

index b2e6a0c4cb03e240c50a802b8f60f47038bc3c6d..6b46c9f02999ccd8e053ab9cd371704b395d7a41 100644 (file)
@@ -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
index 0bb0422cc7862e04539e59aaf35bd8c916fe9680..b9b73a3fd0849d136de3818236db0fab7a3aea9e 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -546,11 +546,15 @@ gui_init()
 #ifdef USR_GVIMRC_FILE2
                 && 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
            }
 
@@ -592,6 +596,10 @@ gui_init()
 #ifdef USR_GVIMRC_FILE3
                        && 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);
index b524c7edaac0e3964096282ed2f74e813d336aa0..9c11b432a541a4acddf9096a9d5c5e38e0483ce8 100644 (file)
@@ -2980,6 +2980,10 @@ source_startup_scripts(parmp)
 #ifdef USR_VIMRC_FILE3
                && 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)
index 69a1523e49a9da6cfb8ea279cc2ece5b8cf89309..bcdba32ad3f01285937c4799399c62bfaf98818e 100644 (file)
@@ -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
index 103cded5afa6f8915bb4196e9171897af678f2a9..17246d4f708c368ed06b69ee446e6d2a3f43ae58 100644 (file)
 # 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"
 #  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"
index 3c9224cd25622fc0e2eaa635e47c4f581cd2c447..02eeafc9662de6ad3ca5ee3af6e3df16bb261459 100644 (file)
@@ -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
 
index f42c31f652a6ef486277fca261d474fe736fd899..32a81cfe2564d6bfcf7676d3cce537bcc5cee753 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1178,
 /**/
     1177,
 /**/