vim-patch:8.0.0716: "--clean", 'shadafile' #9907

Nvim notes:
- Nvim does not support "-u DEFAULTS", that change is omitted.
- Also add 'shadafile' as an alias to 'viminfofile'.
- Deprecate 'viminfofile'.

Problem:    Not easy to start Vim cleanly without changing the viminfo file.
            Not possible to know whether the -i command line flag was used.
Solution:   Add the --clean command line argument.  Add the 'viminfofile'
            option.  Add "-u DEFAULTS".
c4da113ef9
This commit is contained in:
Justin M. Keyes
2019-04-15 21:15:36 +02:00
committed by GitHub
parent 987619ddd7
commit aa82f8b88f
9 changed files with 60 additions and 20 deletions

View File

@@ -871,6 +871,9 @@ static void command_line_scan(mparm_T *parmp)
} else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0) {
want_argument = true;
argv_idx += 11;
} else if (STRNICMP(argv[0] + argv_idx, "clean", 5) == 0) {
parmp->use_vimrc = "NONE";
set_option_value("shadafile", 0L, "NONE", 0);
} else {
if (argv[0][argv_idx])
mainerr(err_opt_unknown, argv[0]);
@@ -1129,7 +1132,7 @@ static void command_line_scan(mparm_T *parmp)
}
case 'i': { // "-i {shada}" use for shada
used_shada_file = argv[0];
set_option_value("shadafile", 0L, argv[0], 0);
break;
}