aboutsummaryrefslogtreecommitdiff
path: root/src/nvim
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-07-13 19:12:08 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2021-07-14 21:54:19 +0200
commitf0cc3a9480ffc30624a70ebd1e30146bc03a7029 (patch)
treec9c3af0402dc215f131261697952b08aaeb6b9f9 /src/nvim
parentfc869da6dc94970e9aa26d51bd605d383f4a4c4e (diff)
downloadrneovim-f0cc3a9480ffc30624a70ebd1e30146bc03a7029.tar.gz
rneovim-f0cc3a9480ffc30624a70ebd1e30146bc03a7029.tar.bz2
rneovim-f0cc3a9480ffc30624a70ebd1e30146bc03a7029.zip
refactor(options): remove obsolete distinction of "vi" vs "vim" defaults
It might come as a schocking surprise, but the defaults we support are the NEOVIM defaults.
Diffstat (limited to 'src/nvim')
-rw-r--r--src/nvim/generators/gen_options.lua12
-rw-r--r--src/nvim/option.c108
-rw-r--r--src/nvim/options.lua405
-rw-r--r--src/nvim/testdir/setup.vim2
-rw-r--r--src/nvim/testdir/test_mksession.vim6
5 files changed, 96 insertions, 437 deletions
diff --git a/src/nvim/generators/gen_options.lua b/src/nvim/generators/gen_options.lua
index c073918b3f..9f91160034 100644
--- a/src/nvim/generators/gen_options.lua
+++ b/src/nvim/generators/gen_options.lua
@@ -69,7 +69,6 @@ local get_flags = function(o)
{'alloced'},
{'nodefault'},
{'no_mkrc'},
- {'vi_def'},
{'secure'},
{'gettext'},
{'noglob'},
@@ -119,8 +118,11 @@ local get_value = function(v)
return '(char_u *) ' .. value_dumpers[type(v)](v)
end
-local get_defaults = function(d)
- return ('{' .. get_value(d.vi) .. ', ' .. get_value(d.vim) .. '}')
+local get_defaults = function(d,n)
+ if (d.vi == nil and d.vim == nil) or (d.vi ~= nil and d.vim ~= nil) then
+ error("option '"..n.."' should have one and only one default value")
+ end
+ return get_value(d.vim or d.vi)
end
local defines = {}
@@ -169,11 +171,11 @@ local dump_option = function(i, o)
if o.defaults.condition then
w(get_cond(o.defaults.condition))
end
- w(' .def_val=' .. get_defaults(o.defaults.if_true))
+ w(' .def_val=' .. get_defaults(o.defaults.if_true, o.full_name))
if o.defaults.condition then
if o.defaults.if_false then
w('#else')
- w(' .def_val=' .. get_defaults(o.defaults.if_false))
+ w(' .def_val=' .. get_defaults(o.defaults.if_false, o.full_name))
end
w('#endif')
end
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 53702cd727..f67cfd109b 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -16,8 +16,6 @@
// - If it's a numeric option, add any necessary bounds checks to
// set_num_option().
// - If it's a list of flags, add some code in do_set(), search for WW_ALL.
-// - When adding an option with expansion (P_EXPAND), but with a different
-// default for Vi and Vim (no P_VI_DEF), add some code at VIMEXP.
// - Add documentation! doc/options.txt, and any other related places.
// - Add an entry in runtime/optwin.vim.
@@ -208,12 +206,10 @@ typedef struct vimoption {
// buffer-local option: global value
idopt_T indir; // global option: PV_NONE;
// local option: indirect option index
- char_u *def_val[2]; // default values for variable (vi and vim)
+ char_u *def_val; // default values for variable (neovim!!)
LastSet last_set; // script in which the option was last set
} vimoption_T;
-#define VI_DEFAULT 0 // def_val[VI_DEFAULT] is Vi default value
-#define VIM_DEFAULT 1 // def_val[VIM_DEFAULT] is Vim default value
/*
* Flags
@@ -232,7 +228,6 @@ typedef struct vimoption {
// use free() when assigning new value
#define P_WAS_SET 0x100U // option has been set/reset
#define P_NO_MKRC 0x200U // don't include in :mkvimrc output
-#define P_VI_DEF 0x400U // Use Vi default for Vim
// when option changed, what to display:
#define P_RSTAT 0x1000U ///< redraw status lines
@@ -458,7 +453,7 @@ void set_init_1(bool clean_arg)
buf[j] = NUL;
opt_idx = findoption("cdpath");
if (opt_idx >= 0) {
- options[opt_idx].def_val[VI_DEFAULT] = buf;
+ options[opt_idx].def_val = buf;
options[opt_idx].flags |= P_DEF_ALLOCED;
} else {
xfree(buf); // cannot happen
@@ -526,7 +521,7 @@ void set_init_1(bool clean_arg)
check_win_options(curwin);
check_options();
- // Set all options to their Vim default
+ // Set all options to their default value
set_options_default(OPT_FREE);
// set 'laststatus'
@@ -562,15 +557,10 @@ void set_init_1(bool clean_arg)
if (p != NULL) {
p = xstrdup(p);
*(char **)options[opt_idx].var = p;
- /* VIMEXP
- * Defaults for all expanded options are currently the same for Vi
- * and Vim. When this changes, add some code here! Also need to
- * split P_DEF_ALLOCED in two.
- */
if (options[opt_idx].flags & P_DEF_ALLOCED) {
- xfree(options[opt_idx].def_val[VI_DEFAULT]);
+ xfree(options[opt_idx].def_val);
}
- options[opt_idx].def_val[VI_DEFAULT] = (char_u *)p;
+ options[opt_idx].def_val = (char_u *)p;
options[opt_idx].flags |= P_DEF_ALLOCED;
}
}
@@ -613,39 +603,34 @@ void set_init_1(bool clean_arg)
/// Set an option to its default value.
/// This does not take care of side effects!
-static void
-set_option_default(
- int opt_idx,
- int opt_flags, // OPT_FREE, OPT_LOCAL and/or OPT_GLOBAL
- int compatible // use Vi default value
-)
+///
+/// @param opt_flags OPT_FREE, OPT_LOCAL and/or OPT_GLOBAL
+static void set_option_default(int opt_idx, int opt_flags)
{
char_u *varp; // pointer to variable for current option
- int dvi; // index in def_val[]
int both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0;
varp = get_varp_scope(&(options[opt_idx]), both ? OPT_LOCAL : opt_flags);
uint32_t flags = options[opt_idx].flags;
if (varp != NULL) { // skip hidden option, nothing to do for it
- dvi = ((flags & P_VI_DEF) || compatible) ? VI_DEFAULT : VIM_DEFAULT;
if (flags & P_STRING) {
/* Use set_string_option_direct() for local options to handle
* freeing and allocating the value. */
if (options[opt_idx].indir != PV_NONE) {
set_string_option_direct(NULL, opt_idx,
- options[opt_idx].def_val[dvi], opt_flags, 0);
+ options[opt_idx].def_val, opt_flags, 0);
} else {
if ((opt_flags & OPT_FREE) && (flags & P_ALLOCED)) {
free_string_option(*(char_u **)(varp));
}
- *(char_u **)varp = options[opt_idx].def_val[dvi];
+ *(char_u **)varp = options[opt_idx].def_val;
options[opt_idx].flags &= ~P_ALLOCED;
}
} else if (flags & P_NUM) {
if (options[opt_idx].indir == PV_SCROLL) {
win_comp_scroll(curwin);
} else {
- long def_val = (long)options[opt_idx].def_val[dvi];
+ long def_val = (long)options[opt_idx].def_val;
if ((long *)varp == &curwin->w_p_so
|| (long *)varp == &curwin->w_p_siso) {
// 'scrolloff' and 'sidescrolloff' local values have a
@@ -661,7 +646,7 @@ set_option_default(
}
}
} else { // P_BOOL
- *(int *)varp = (int)(intptr_t)options[opt_idx].def_val[dvi];
+ *(int *)varp = (int)(intptr_t)options[opt_idx].def_val;
#ifdef UNIX
// 'modeline' defaults to off for root
if (options[opt_idx].indir == PV_ML && getuid() == ROOT_UID) {
@@ -691,7 +676,7 @@ set_options_default(
{
for (int i = 0; options[i].fullname; i++) {
if (!(options[i].flags & P_NODEFAULT)) {
- set_option_default(i, opt_flags, false);
+ set_option_default(i, opt_flags);
}
}
@@ -715,10 +700,10 @@ static void set_string_default(const char *name, char *val, bool allocated)
int opt_idx = findoption(name);
if (opt_idx >= 0) {
if (options[opt_idx].flags & P_DEF_ALLOCED) {
- xfree(options[opt_idx].def_val[VI_DEFAULT]);
+ xfree(options[opt_idx].def_val);
}
- options[opt_idx].def_val[VI_DEFAULT] = allocated
+ options[opt_idx].def_val = allocated
? (char_u *)val
: (char_u *)xstrdup(val);
options[opt_idx].flags |= P_DEF_ALLOCED;
@@ -765,7 +750,7 @@ void set_number_default(char *name, long val)
opt_idx = findoption(name);
if (opt_idx >= 0) {
- options[opt_idx].def_val[VI_DEFAULT] = (char_u *)(intptr_t)val;
+ options[opt_idx].def_val = (char_u *)(intptr_t)val;
}
}
@@ -780,7 +765,7 @@ void free_all_options(void)
free_string_option(*(char_u **)options[i].var);
}
if (options[i].flags & P_DEF_ALLOCED) {
- free_string_option(options[i].def_val[VI_DEFAULT]);
+ free_string_option(options[i].def_val);
}
} else if (options[i].var != VAR_WIN && (options[i].flags & P_STRING)) {
// buffer-local option: free global value
@@ -803,7 +788,7 @@ void set_init_2(bool headless)
// which results in the actual value computed from the window height.
idx = findoption("scroll");
if (idx >= 0 && !(options[idx].flags & P_WAS_SET)) {
- set_option_default(idx, OPT_LOCAL, false);
+ set_option_default(idx, OPT_LOCAL);
}
comp_col();
@@ -849,11 +834,11 @@ void set_init_3(void)
) {
if (do_sp) {
p_sp = (char_u *)"|& tee";
- options[idx_sp].def_val[VI_DEFAULT] = p_sp;
+ options[idx_sp].def_val = p_sp;
}
if (do_srr) {
p_srr = (char_u *)">&";
- options[idx_srr].def_val[VI_DEFAULT] = p_srr;
+ options[idx_srr].def_val = p_srr;
}
} else if (fnamecmp(p, "sh") == 0
|| fnamecmp(p, "ksh") == 0
@@ -869,11 +854,11 @@ void set_init_3(void)
// Always use POSIX shell style redirection if we reach this
if (do_sp) {
p_sp = (char_u *)"2>&1| tee";
- options[idx_sp].def_val[VI_DEFAULT] = p_sp;
+ options[idx_sp].def_val = p_sp;
}
if (do_srr) {
p_srr = (char_u *)">%s 2>&1";
- options[idx_srr].def_val[VI_DEFAULT] = p_srr;
+ options[idx_srr].def_val = p_srr;
}
}
xfree(p);
@@ -940,12 +925,12 @@ void set_title_defaults(void)
*/
idx1 = findoption("title");
if (idx1 >= 0 && !(options[idx1].flags & P_WAS_SET)) {
- options[idx1].def_val[VI_DEFAULT] = (char_u *)(intptr_t)0;
+ options[idx1].def_val = (char_u *)(intptr_t)0;
p_title = 0;
}
idx1 = findoption("icon");
if (idx1 >= 0 && !(options[idx1].flags & P_WAS_SET)) {
- options[idx1].def_val[VI_DEFAULT] = (char_u *)(intptr_t)0;
+ options[idx1].def_val = (char_u *)(intptr_t)0;
p_icon = 0;
}
}
@@ -985,7 +970,6 @@ int do_set(
int adding; // "opt+=arg"
int prepending; // "opt^=arg"
int removing; // "opt-=arg"
- int cp_val = 0;
if (*arg == NUL) {
showoptions(0, opt_flags);
@@ -1156,13 +1140,10 @@ int do_set(
if (vim_strchr((char_u *)"?=:!&<", nextchar) != NULL) {
arg += len;
- cp_val = false;
if (nextchar == '&' && arg[1] == 'v' && arg[2] == 'i') {
- if (arg[3] == 'm') { // "opt&vim": set to Vim default
- cp_val = false;
+ if (arg[3] == 'm') { // "opt&vim": set to Vim default
arg += 3;
- } else { // "opt&vi": set to Vi default
- cp_val = true;
+ } else { // "opt&vi": set to Vi default
arg += 2;
}
}
@@ -1229,9 +1210,7 @@ int do_set(
if (nextchar == '!') {
value = *(int *)(varp) ^ 1;
} else if (nextchar == '&') {
- value = (int)(intptr_t)options[opt_idx].def_val[
- ((flags & P_VI_DEF) || cp_val)
- ? VI_DEFAULT : VIM_DEFAULT];
+ value = (int)(intptr_t)options[opt_idx].def_val;
} else if (nextchar == '<') {
// For 'autoread' -1 means to use global value.
if ((int *)varp == &curbuf->b_p_ar
@@ -1276,8 +1255,7 @@ int do_set(
// other error
arg++;
if (nextchar == '&') {
- value = (long)(intptr_t)options[opt_idx].def_val[
- ((flags & P_VI_DEF) || cp_val) ? VI_DEFAULT : VIM_DEFAULT];
+ value = (long)(intptr_t)options[opt_idx].def_val;
} else if (nextchar == '<') {
// For 'undolevels' NO_LOCAL_UNDOLEVEL means to
// use the global value.
@@ -1354,14 +1332,12 @@ int do_set(
origval = oldval;
}
- if (nextchar == '&') { // set to default val
- newval = options[opt_idx].def_val[
- ((flags & P_VI_DEF) || cp_val)
- ? VI_DEFAULT : VIM_DEFAULT];
- /* expand environment variables and ~ (since the
- * default value was already expanded, only
- * required when an environment variable was set
- * later */
+ if (nextchar == '&') { // set to default val
+ newval = options[opt_idx].def_val;
+ // expand environment variables and ~ (since the
+ // default value was already expanded, only
+ // required when an environment variable was set
+ // later
new_value_alloced = true;
if (newval == NULL) {
newval = empty_option;
@@ -5090,20 +5066,17 @@ showoptions(
/// Return true if option "p" has its default value.
static int optval_default(vimoption_T *p, char_u *varp)
{
- int dvi;
-
if (varp == NULL) {
return true; // hidden option is always at default
}
- dvi = (p->flags & P_VI_DEF) ? VI_DEFAULT : VIM_DEFAULT;
if (p->flags & P_NUM) {
- return *(long *)varp == (long)(intptr_t)p->def_val[dvi];
+ return *(long *)varp == (long)(intptr_t)p->def_val;
}
if (p->flags & P_BOOL) {
- return *(int *)varp == (int)(intptr_t)p->def_val[dvi];
+ return *(int *)varp == (int)(intptr_t)p->def_val;
}
// P_STRING
- return STRCMP(*(char_u **)varp, p->def_val[dvi]) == 0;
+ return STRCMP(*(char_u **)varp, p->def_val) == 0;
}
/// Send update to UIs with values of UI relevant options
@@ -6152,7 +6125,7 @@ void reset_modifiable(void)
p_ma = false;
opt_idx = findoption("ma");
if (opt_idx >= 0) {
- options[opt_idx].def_val[VI_DEFAULT] = false;
+ options[opt_idx].def_val = false;
}
}
@@ -6851,7 +6824,7 @@ static void paste_option_changed(void)
/// vimrc_found() - Called when a vimrc or "VIMINIT" has been found.
///
-/// Set the values for options that didn't get set yet to the Vim defaults.
+/// Set the values for options that didn't get set yet to the defaults.
/// When "fname" is not NULL, use it to set $"envname" when it wasn't set yet.
void vimrc_found(char_u *fname, char_u *envname)
{
@@ -7745,8 +7718,7 @@ static Dictionary vimoption2dict(vimoption_T *opt)
const char *type;
Object def;
// TODO(bfredl): do you even nocp?
- char_u *def_val = opt->def_val[(opt->flags & P_VI_DEF)
- ? VI_DEFAULT : VIM_DEFAULT];
+ char_u *def_val = opt->def_val;
if (opt->flags & P_STRING) {
type = "string";
def = CSTR_TO_OBJ(def_val ? (char *)def_val : "");
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index 87750ef8e0..48e53c68f3 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -10,7 +10,7 @@
-- secure=nil, gettext=nil, noglob=nil, normal_fname_chars=nil,
-- pri_mkrc=nil, deny_in_modelines=nil, normal_dname_chars=nil,
-- modelineexpr=nil,
--- expand=nil, nodefault=nil, no_mkrc=nil, vi_def=true,
+-- expand=nil, nodefault=nil, no_mkrc=nil,
-- alloced=nil,
-- save_pv_indir=nil,
-- redraw={'curswant'},
@@ -55,7 +55,6 @@ return {
full_name='aleph', abbreviation='al',
short_desc=N_("ASCII code of the letter Aleph (Hebrew)"),
type='number', scope={'global'},
- vi_def=true,
redraw={'curswant'},
varname='p_aleph',
defaults={if_true={vi=224}}
@@ -64,7 +63,6 @@ return {
full_name='arabic', abbreviation='arab',
short_desc=N_("Arabic as a default second language"),
type='bool', scope={'window'},
- vi_def=true,
redraw={'curswant'},
defaults={if_true={vi=false}}
},
@@ -72,7 +70,6 @@ return {
full_name='arabicshape', abbreviation='arshape',
short_desc=N_("do shaping for Arabic characters"),
type='bool', scope={'global'},
- vi_def=true,
redraw={'all_windows', 'ui_option'},
varname='p_arshape',
@@ -82,7 +79,6 @@ return {
full_name='allowrevins', abbreviation='ari',
short_desc=N_("allow CTRL-_ in Insert and Command-line mode"),
type='bool', scope={'global'},
- vi_def=true,
varname='p_ari',
defaults={if_true={vi=false}}
},
@@ -90,7 +86,6 @@ return {
full_name='ambiwidth', abbreviation='ambw',
short_desc=N_("what to do with Unicode chars of ambiguous width"),
type='string', scope={'global'},
- vi_def=true,
redraw={'all_windows', 'ui_option'},
varname='p_ambw',
defaults={if_true={vi="single"}}
@@ -99,7 +94,6 @@ return {
full_name='autochdir', abbreviation='acd',
short_desc=N_("change directory to the file in the current window"),
type='bool', scope={'global'},
- vi_def=true,
varname='p_acd',
defaults={if_true={vi=false}}
},
@@ -108,20 +102,19 @@ return {
short_desc=N_("take indent for new line from previous line"),
type='bool', scope={'buffer'},
varname='p_ai',
- defaults={if_true={vi=false, vim=true}}
+ defaults={if_true={vim=true}}
},
{
full_name='autoread', abbreviation='ar',
short_desc=N_("autom. read file when changed outside of Vim"),
type='bool', scope={'global', 'buffer'},
varname='p_ar',
- defaults={if_true={vi=false, vim=true}}
+ defaults={if_true={vim=true}}
},
{
full_name='autowrite', abbreviation='aw',
short_desc=N_("automatically write file if changed"),
type='bool', scope={'global'},
- vi_def=true,
varname='p_aw',
defaults={if_true={vi=false}}
},
@@ -129,7 +122,6 @@ return {
full_name='autowriteall', abbreviation='awa',
short_desc=N_("as 'autowrite', but works with more commands"),
type='bool', scope={'global'},
- vi_def=true,
varname='p_awa',
defaults={if_true={vi=false}}
},
@@ -139,7 +131,7 @@ return {
type='string', scope={'global'},
redraw={'all_windows'},
varname='p_bg',
- defaults={if_true={vi="light",vim="dark"}}
+ defaults={if_true={vim="dark"}}
},
{
full_name='backspace', abbreviation='bs',
@@ -147,13 +139,12 @@ return {
type='string', list='onecomma', scope={'global'},
deny_duplicates=true,
varname='p_bs',
- defaults={if_true={vi="", vim="indent,eol,start"}}
+ defaults={if_true={vim="indent,eol,start"}}
},
{
full_name='backup', abbreviation='bk',
short_desc=N_("keep backup file after overwriting a file"),
type='bool', scope={'global'},
- vi_def=true,
varname='p_bk',
defaults={if_true={vi=false}}
},
@@ -165,8 +156,8 @@ return {
varname='p_bkc',
defaults={
condition='UNIX',
- if_true={vi="yes", vim="auto"},
- if_false={vi="auto", vim="auto"}
+ if_true={vim="auto"},
+ if_false={vim="auto"}
},
},
{
@@ -175,7 +166,6 @@ return {
type='string', list='onecomma', scope={'global'},
deny_duplicates=true,
secure=true,
- vi_def=true,
expand='nodefault',
varname='p_bdir',
defaults={if_true={vi=''}}
@@ -185,7 +175,6 @@ return {
short_desc=N_("extension used for the backup file"),
type='string', scope={'global'},
normal_fname_chars=true,
- vi_def=true,
varname='p_bex',
defaults={if_true={vi="~"}}
},
@@ -194,7 +183,6 @@ return {
short_desc=N_("no backup for files that match these patterns"),
type='string', list='onecomma', scope={'global'},
deny_duplicates=true,
- vi_def=true,
varname='p_bsk',
defaults={if_true={vi=""}}
},
@@ -203,7 +191,6 @@ return {
short_desc=N_("do not ring the bell for these reasons"),
type='string', list='comma', scope={'global'},
deny_duplicates=true,
- vi_def=true,
varname='p_bo',
defaults={if_true={vi="all"}}
},
@@ -211,7 +198,6 @@ return {
full_name='binary', abbreviation='bin',
short_desc=N_("read/write/edit file in binary mode"),
type='bool', scope={'buffer'},
- vi_def=true,
redraw={'statuslines'},
varname='p_bin',
defaults={if_true={vi=false}}
@@ -221,7 +207,6 @@ return {
short_desc=N_("a Byte Order Mark to the file"),
type='bool', scope={'buffer'},
no_mkrc=true,
- vi_def=true,
redraw={'statuslines'},
varname='p_bomb',
defaults={if_true={vi=false}}
@@ -230,7 +215,6 @@ return {
full_name='breakat', abbreviation='brk',
short_desc=N_("characters that may cause a line break"),
type='string', list='flags', scope={'global'},
- vi_def=true,
redraw={'all_windows'},
varname='p_breakat',
defaults={if_true={vi=" \t!@*-+;:,./?"}}
@@ -239,7 +223,6 @@ return {
full_name='breakindent', abbreviation='bri',
short_desc=N_("wrapped line repeats indent"),
type='bool', scope={'window'},
- vi_def=true,
redraw={'current_window'},
defaults={if_true={vi=false}}
},
@@ -248,7 +231,6 @@ return {
short_desc=N_("settings for 'breakindent'"),
type='string', list='onecomma', scope={'window'},
deny_duplicates=true,
- vi_def=true,
alloced=true,
redraw={'current_buffer'},
defaults={if_true={vi=""}},
@@ -257,7 +239,6 @@ return {
full_name='browsedir', abbreviation='bsdir',
short_desc=N_("which directory to start browsing in"),
type='string', scope={'global'},
- vi_def=true,
enable_if=false,
},
{
@@ -265,7 +246,6 @@ return {
short_desc=N_("what to do when buffer is no longer in window"),
type='string', scope={'buffer'},
noglob=true,
- vi_def=true,
alloced=true,
varname='p_bh',
defaults={if_true={vi=""}}
@@ -275,7 +255,6 @@ return {
short_desc=N_("whether the buffer shows up in the buffer list"),
type='bool', scope={'buffer'},
noglob=true,
- vi_def=true,
varname='p_bl',
defaults={if_true={vi=1}}
},
@@ -284,7 +263,6 @@ return {
short_desc=N_("special type of buffer"),
type='string', scope={'buffer'},
noglob=true,
- vi_def=true,
alloced=true,
varname='p_bt',
defaults={if_true={vi=""}}
@@ -294,7 +272,6 @@ return {
short_desc=N_("specifies how case of letters is changed"),
type='string', list='onecomma', scope={'global'},
deny_duplicates=true,
- vi_def=true,
varname='p_cmp',
defaults={if_true={vi="internal,keepascii"}}
},
@@ -303,7 +280,6 @@ return {
short_desc=N_("list of directories searched with \":cd\""),
type='string', list='comma', scope={'global'},
deny_duplicates=true,
- vi_def=true,
expand=true,
secure=true,
varname='p_cdpath',
@@ -314,7 +290,7 @@ return {
short_desc=N_("used to open the command-line window"),
type='string', scope={'global'},
varname='p_cedit',
- defaults={if_true={vi="", vim=macros('CTRL_F_STR')}}
+ defaults={if_true={vim=macros('CTRL_F_STR')}}
},
{
full_name='channel',
@@ -330,7 +306,6 @@ return {
short_desc=N_("expression for character encoding conversion"),
type='string', scope={'global'},
secure=true,
- vi_def=true,
varname='p_ccv',
defaults={if_true={vi=""}}
},
@@ -338,7 +313,6 @@ return {
full_name='cindent', abbreviation='cin',
short_desc=N_("do C program indenting"),
type='bool', scope={'buffer'},
- vi_def=true,
varname='p_cin',
defaults={if_true={vi=false}}
},
@@ -347,7 +321,6 @@ return {
short_desc=N_("keys that trigger indent when 'cindent' is set"),
type='string', list='onecomma', scope={'buffer'},
deny_duplicates=true,
- vi_def=true,
alloced=true,
varname='p_cink',
defaults={if_true={vi=indentkeys_default}}
@@ -357,7 +330,6 @@ return {
short_desc=N_("how to do indenting when 'cindent' is set"),
type='string', list='onecomma', scope={'buffer'},
deny_duplicates=true,
- vi_def=true,
alloced=true,
varname='p_cino',
defaults={if_true={vi=""}}
@@ -367,7 +339,6 @@ return {
short_desc=N_("words where 'si' and 'cin' add an indent"),
type='string', list='onecomma', scope={'buffer'},
deny_duplicates=true,
- vi_def=true,
alloced=true,
varname='p_cinw',
defaults={if_true={vi="if,else,while,do,for,switch"}}
@@ -377,7 +348,6 @@ return {
short_desc=N_("use the clipboard as the unnamed register"),
type='string', list='onecomma', scope={'global'},
deny_duplicates=true,
- vi_def=true,
varname='p_cb',
defaults={if_true={vi=""}}
},
@@ -385,7 +355,6 @@ return {
full_name='cmdheight', abbreviation='ch',
short_desc=N_("number of lines to use for the command-line"),
type='number', scope={'global'},
- vi_def=true,
redraw={'all_windows'},
varname='p_ch',
defaults={if_true={vi=1}}
@@ -394,7 +363,6 @@ return {
full_name='cmdwinheight', abbreviation='cwh',
short_desc=N_("height of the command-line window"),
type='number', scope={'global'},
- vi_def=true,
varname='p_cwh',
defaults={if_true={vi=7}}
},
@@ -403,7 +371,6 @@ return {
short_desc=N_("columns to highlight"),
type='string', list='onecomma', scope={'window'},
deny_duplicates=true,
- vi_def=true,
redraw={'current_window'},
defaults={if_true={vi=""}}
},
@@ -412,7 +379,6 @@ return {
short_desc=N_("number of columns in the display"),
type='number', scope={'global'},
no_mkrc=true,
- vi_def=true,
redraw={'everything'},
varname='p_columns',
defaults={if_true={vi=macros('DFLT_COLS')}}
@@ -422,7 +388,6 @@ return {
short_desc=N_("patterns that can start a comment line"),
type='string', list='onecomma', scope={'buffer'},
deny_duplicates=true,
- vi_def=true,
alloced=true,
redraw={'curswant'},
varname='p_com',
@@ -432,7 +397,6 @@ return {
full_name='commentstring', abbreviation='cms',
short_desc=N_("template for comments; used for fold marker"),
type='string', scope={'buffer'},
- vi_def=true,
alloced=true,
redraw={'curswant'},
varname='p_cms',
@@ -446,7 +410,7 @@ return {
varname='p_force_off',
-- pri_mkrc isn't needed here, optval_default()
-- always returns TRUE for 'compatible'
- defaults={if_true={vi=true, vim=false}}
+ defaults={if_true={vim=false}}
},
{
full_name='complete', abbreviation='cpt',
@@ -455,13 +419,12 @@ return {
deny_duplicates=true,
alloced=true,
varname='p_cpt',
- defaults={if_true={vi=".,w,b,u,t,i", vim=".,w,b,u,t"}}
+ defaults={if_true={vim=".,w,b,u,t"}}
},
{
full_name='concealcursor', abbreviation='cocu',
short_desc=N_("whether concealable text is hidden in cursor line"),
type='string', scope={'window'},
- vi_def=true,
alloced=true,
redraw={'current_window'},
defaults={if_true={vi=""}}
@@ -470,7 +433,6 @@ return {
full_name='conceallevel', abbreviation='cole',
short_desc=N_("whether concealable text is shown or hidden"),
type='number', scope={'window'},
- vi_def=true,
redraw={'current_window'},
defaults={if_true={vi=0}}
},
@@ -479,7 +441,6 @@ return {
short_desc=N_("function to be used for Insert mode completion"),
type='string', scope={'buffer'},
secure=true,
- vi_def=true,
alloced=true,
varname='p_cfu',
defaults={if_true={vi=""}}
@@ -489,14 +450,12 @@ return {
short_desc=N_("options for Insert mode completion"),
type='string', list='onecomma', scope={'global'},
deny_duplicates=true,
- vi_def=true,
varname='p_cot',
defaults={if_true={vi="menu,preview"}}
},
{
full_name='completeslash', abbreviation='csl',
type='string', scope={'buffer'},
- vi_def=true,
varname='p_csl',
enable_if='BACKSLASH_IN_FILENAME',
defaults={if_true={vi=""}}
@@ -505,7 +464,6 @@ return {
full_name='confirm', abbreviation='cf',
short_desc=N_("ask what to do about unsaved/read-only files"),
type='bool', scope={'global'},
- vi_def=true,
varname='p_confirm',
defaults={if_true={vi=false}}
},
@@ -513,7 +471,6 @@ return {
full_name='copyindent', abbreviation='ci',
short_desc=N_("make 'autoindent' use existing indent structure"),
type='bool', scope={'buffer'},
- vi_def=true,
varname='p_ci',
defaults={if_true={vi=false}}
},
@@ -523,13 +480,12 @@ return {
type='string', list='flags', scope={'global'},
redraw={'all_windows'},
varname='p_cpo',
- defaults={if_true={vi=macros('CPO_VI'), vim=macros('CPO_VIM')}}
+ defaults={if_true={vim=macros('CPO_VIM')}}
},
{
full_name='cscopepathcomp', abbreviation='cspc',
short_desc=N_("how many components of the path to show"),
type='number', scope={'global'},
- vi_def=true,
varname='p_cspc',
defaults={if_true={vi=0}}
},
@@ -538,7 +494,6 @@ return {
short_desc=N_("command to execute cscope"),
type='string', scope={'global'},
secure=true,
- vi_def=true,
expand=true,
varname='p_csprg',
defaults={if_true={vi="cscope"}}
@@ -548,7 +503,6 @@ return {
short_desc=N_("use quickfix window for cscope results"),
type='string', list='onecomma', scope={'global'},
deny_duplicates=true,
- vi_def=true,
varname='p_csqf',
defaults={if_true={vi=""}}
},
@@ -556,7 +510,6 @@ return {
full_name='cscoperelative', abbreviation='csre',
short_desc=N_("Use cscope.out path basename as prefix"),
type='bool', scope={'global'},
- vi_def=true,
varname='p_csre',
defaults={if_true={vi=0}}
},
@@ -564,7 +517,6 @@ return {
full_name='cscopetag', abbreviation='cst',
short_desc=N_("use cscope for tag commands"),
type='bool', scope={'global'},
- vi_def=true,
varname='p_cst',
defaults={if_true={vi=0}}
},
@@ -572,7 +524,6 @@ return {
full_name='cscopetagorder', abbreviation='csto',
short_desc=N_("determines \":cstag\" search order"),
type='number', scope={'global'},
- vi_def=true,
varname='p_csto',
defaults={if_true={vi=0}}
},
@@ -580,7 +531,6 @@ return {
full_name='cscopeverbose', abbreviation='csverb',
short_desc=N_("give messages when adding a cscope database"),
type='bool', scope={'global'},
- vi_def=true,
varname='p_csverbose',
defaults={if_true={vi=1}}
},
@@ -588,7 +538,6 @@ return {
full_name='cursorbind', abbreviation='crb',
short_desc=N_("move cursor in window as it moves in other windows"),
type='bool', scope={'window'},
- vi_def=true,
pv_name='p_crbind',
defaults={if_true={vi=false}}
},
@@ -596,7 +545,6 @@ return {
full_name='cursorcolumn', abbreviation='cuc',
short_desc=N_("highlight the screen column of the cursor"),
type='bool', scope={'window'},
- vi_def=true,
redraw={'current_window_only'},
defaults={if_true={vi=false}}
},
@@ -604,7 +552,6 @@ return {
full_name='cursorline', abbreviation='cul',
short_desc=N_("highlight the screen line of the cursor"),
type='bool', scope={'window'},
- vi_def=true,
redraw={'current_window_only'},
defaults={if_true={vi=false}}
},
@@ -612,7 +559,6 @@ return {
full_name='debug',
short_desc=N_("to \"msg\" to see all error messages"),
type='string', scope={'global'},
- vi_def=true,
varname='p_debug',
defaults={if_true={vi=""}}
},
@@ -620,7 +566,6 @@ return {
full_name='define', abbreviation='def',
short_desc=N_("pattern to be used to find a macro definition"),
type='string', scope={'global', 'buffer'},
- vi_def=true,
alloced=true,
redraw={'curswant'},
varname='p_def',
@@ -630,7 +575,6 @@ return {
full_name='delcombine', abbreviation='deco',
short_desc=N_("delete combining characters on their own"),
type='bool', scope={'global'},
- vi_def=true,
varname='p_deco',
defaults={if_true={vi=false}}
},
@@ -640,7 +584,6 @@ return {
type='string', list='onecomma', scope={'global', 'buffer'},
deny_duplicates=true,
normal_dname_chars=true,
- vi_def=true,
expand=true,
varname='p_dict',
defaults={if_true={vi=""}}
@@ -650,7 +593,6 @@ return {
short_desc=N_("diff mode for the current window"),
type='bool', scope={'window'},
noglob=true,
- vi_def=true,
redraw={'current_window'},
defaults={if_true={vi=false}}
},
@@ -659,7 +601,6 @@ return {
short_desc=N_("expression used to obtain a diff file"),
type='string', scope={'global'},
secure=true,
- vi_def=true,
redraw={'curswant'},
varname='p_dex',
defaults={if_true={vi=""}}
@@ -669,7 +610,6 @@ return {
short_desc=N_("options for using diff mode"),
type='string', list='onecomma', scope={'global'},
deny_duplicates=true,
- vi_def=true,
alloced=true,
redraw={'current_window'},
varname='p_dip',
@@ -679,7 +619,6 @@ return {
full_name='digraph', abbreviation='dg',
short_desc=N_("enable the entering of digraphs in Insert mode"),
type='bool', scope={'global'},
- vi_def=true,
varname='p_dg',
defaults={if_true={vi=false}}
},
@@ -689,7 +628,6 @@ return {
type='string', list='onecomma', scope={'global'},
deny_duplicates=true,
secure=true,
- vi_def=true,
expand='nodefault',