mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 00:18:33 +00:00
main,version: Remove USR_EXRC_FILE*
This commit is contained in:
@@ -1046,7 +1046,7 @@ You type: ab esc ^V^V^V^V^V^[
|
|||||||
You see: ab esc ^V^V^[
|
You see: ab esc ^V^V^[
|
||||||
|
|
||||||
The command-line contains two actual ^Vs before the ^[. This is
|
The command-line contains two actual ^Vs before the ^[. This is
|
||||||
how it should appear in your .exrc file, if you choose to go that
|
how it should appear in your vimrc file, if you choose to go that
|
||||||
route. The first ^V is there to quote the second ^V; the :ab
|
route. The first ^V is there to quote the second ^V; the :ab
|
||||||
command uses ^V as its own quote character, so you can include quoted
|
command uses ^V as its own quote character, so you can include quoted
|
||||||
whitespace or the | character in the abbreviation. The :ab command
|
whitespace or the | character in the abbreviation. The :ab command
|
||||||
|
@@ -407,7 +407,7 @@ accordingly. Vim proceeds in this order:
|
|||||||
":version" command. Mostly it's "$VIM/vimrc".
|
":version" command. Mostly it's "$VIM/vimrc".
|
||||||
For the Macintosh the $VIMRUNTIME/macmap.vim is read.
|
For the Macintosh the $VIMRUNTIME/macmap.vim is read.
|
||||||
|
|
||||||
*VIMINIT* *EXINIT* *.exrc* *_exrc* *$MYVIMRC*
|
*VIMINIT* *EXINIT* *$MYVIMRC*
|
||||||
b. Four places are searched for initializations. The first that exists
|
b. Four places are searched for initializations. The first that exists
|
||||||
is used, the others are ignored. The $MYVIMRC environment variable is
|
is used, the others are ignored. The $MYVIMRC environment variable is
|
||||||
set to the file that was first found, unless $MYVIMRC was already set
|
set to the file that was first found, unless $MYVIMRC was already set
|
||||||
@@ -417,9 +417,6 @@ accordingly. Vim proceeds in this order:
|
|||||||
- The user vimrc file: $XDG_CONFIG_HOME/nvim/init.vim.
|
- The user vimrc file: $XDG_CONFIG_HOME/nvim/init.vim.
|
||||||
- The environment variable EXINIT.
|
- The environment variable EXINIT.
|
||||||
The value of $EXINIT is used as an Ex command line.
|
The value of $EXINIT is used as an Ex command line.
|
||||||
- The user exrc file(s). Same as for the user vimrc file, but with
|
|
||||||
"vimrc" replaced by "exrc". But only one of ".exrc" and "_exrc" is
|
|
||||||
used, depending on the system.
|
|
||||||
|
|
||||||
c. If the 'exrc' option is on (which is not the default), the current
|
c. If the 'exrc' option is on (which is not the default), the current
|
||||||
directory is searched for three files. The first that exists is used,
|
directory is searched for three files. The first that exists is used,
|
||||||
|
@@ -1834,12 +1834,8 @@ static void source_startup_scripts(mparm_T *parmp)
|
|||||||
// The first that exists is used, the rest is ignored.
|
// The first that exists is used, the rest is ignored.
|
||||||
char_u *user_vimrc = (char_u *)stdpaths_user_conf_subpath("init.vim");
|
char_u *user_vimrc = (char_u *)stdpaths_user_conf_subpath("init.vim");
|
||||||
if (process_env("VIMINIT", true) != OK) {
|
if (process_env("VIMINIT", true) != OK) {
|
||||||
if (do_source(user_vimrc, true, DOSO_VIMRC) == FAIL
|
if (do_source(user_vimrc, true, DOSO_VIMRC) == FAIL) {
|
||||||
&& process_env("EXINIT", false) == FAIL
|
process_env("EXINIT", false);
|
||||||
&& do_source((char_u *)USR_EXRC_FILE, false, DOSO_NONE) == FAIL) {
|
|
||||||
#ifdef USR_EXRC_FILE2
|
|
||||||
(void)do_source((char_u *)USR_EXRC_FILE2, false, DOSO_NONE);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1877,14 +1873,7 @@ static void source_startup_scripts(mparm_T *parmp)
|
|||||||
else
|
else
|
||||||
secure = 0;
|
secure = 0;
|
||||||
#endif
|
#endif
|
||||||
if ( path_full_compare((char_u *)USR_EXRC_FILE,
|
(void) do_source((char_u *)EXRC_FILE, FALSE, DOSO_NONE);
|
||||||
(char_u *)EXRC_FILE, FALSE) != kEqualFiles
|
|
||||||
#ifdef USR_EXRC_FILE2
|
|
||||||
&& path_full_compare((char_u *)USR_EXRC_FILE2,
|
|
||||||
(char_u *)EXRC_FILE, FALSE) != kEqualFiles
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
(void)do_source((char_u *)EXRC_FILE, FALSE, DOSO_NONE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xfree(user_vimrc);
|
xfree(user_vimrc);
|
||||||
|
@@ -28,9 +28,6 @@
|
|||||||
#ifndef SYNTAX_FNAME
|
#ifndef SYNTAX_FNAME
|
||||||
# define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim"
|
# define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim"
|
||||||
#endif
|
#endif
|
||||||
#ifndef USR_EXRC_FILE
|
|
||||||
# define USR_EXRC_FILE "~/.exrc"
|
|
||||||
#endif
|
|
||||||
#ifndef EXRC_FILE
|
#ifndef EXRC_FILE
|
||||||
# define EXRC_FILE ".exrc"
|
# define EXRC_FILE ".exrc"
|
||||||
#endif
|
#endif
|
||||||
|
@@ -7,7 +7,6 @@
|
|||||||
#define TEMP_FILE_PATH_MAXLEN _MAX_PATH
|
#define TEMP_FILE_PATH_MAXLEN _MAX_PATH
|
||||||
|
|
||||||
// Defines needed to fix the build on Windows:
|
// Defines needed to fix the build on Windows:
|
||||||
// - USR_EXRC_FILE
|
|
||||||
// - DFLT_DIR
|
// - DFLT_DIR
|
||||||
// - DFLT_BDIR
|
// - DFLT_BDIR
|
||||||
// - DFLT_VDIR
|
// - DFLT_VDIR
|
||||||
|
@@ -1067,16 +1067,6 @@ void list_version(void)
|
|||||||
version_msg(SYS_VIMRC_FILE);
|
version_msg(SYS_VIMRC_FILE);
|
||||||
version_msg("\"\n");
|
version_msg("\"\n");
|
||||||
#endif // ifdef SYS_VIMRC_FILE
|
#endif // ifdef SYS_VIMRC_FILE
|
||||||
#ifdef USR_EXRC_FILE
|
|
||||||
version_msg(_(" user exrc file: \""));
|
|
||||||
version_msg(USR_EXRC_FILE);
|
|
||||||
version_msg("\"\n");
|
|
||||||
#endif // ifdef USR_EXRC_FILE
|
|
||||||
#ifdef USR_EXRC_FILE2
|
|
||||||
version_msg(_(" 2nd user exrc file: \""));
|
|
||||||
version_msg(USR_EXRC_FILE2);
|
|
||||||
version_msg("\"\n");
|
|
||||||
#endif // ifdef USR_EXRC_FILE2
|
|
||||||
#ifdef HAVE_PATHDEF
|
#ifdef HAVE_PATHDEF
|
||||||
|
|
||||||
if (*default_vim_dir != NUL) {
|
if (*default_vim_dir != NUL) {
|
||||||
|
Reference in New Issue
Block a user