@@ -57,16 +57,16 @@ call s:Default('backspace', 'indent,eol,start')
5757" Disable completing keywords in included files (e.g., #include in C). When
5858" configured properly, this can result in the slow, recursive scanning of
5959" hundreds of files of dubious relevance.
60- set complete -= i
60+ call s: DefaultMod ( ' complete' , ' -= ' , ' i ' , 0 )
6161call s: DefaultSet (' smarttab' , s: defaultval_yes )
6262
63- set nrformats -= octal
63+ call s: DefaultMod ( ' nrformats' , ' -= ' , ' octal' , 0 )
6464
6565" Make the escape key more responsive by decreasing the wait time for an
6666" escape sequence (e.g., arrow keys).
6767if ! has (' nvim' ) && &ttimeoutlen == -1
68- set ttimeout
69- set ttimeoutlen = 100
68+ call s: DefaultSet ( ' ttimeout' , s: defaultval_yes , 0 )
69+ call s: Default ( ' ttimeoutlen' , ' 100' , 0 )
7070endif
7171
7272if has (' reltime' )
@@ -94,16 +94,17 @@ function! s:SetSidescroll() abort
9494 endif
9595endfunction
9696
97- set display += lastline
97+ let s: display_mods = ' lastline'
9898if has (' patch-7.4.2109' )
99- set display += truncate
99+ let s: display_mods .= ' , truncate'
100100endif
101+ call s: DefaultMod (' display' , ' +=' , s: display_mods , 0 )
101102
102103call s: Default (' listchars' , ' tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+' )
103104
104105" Delete comment character when joining commented lines.
105106if v: version > 703 || v: version == 703 && has (" patch541" )
106- set formatoptions += j
107+ call s: DefaultMod ( ' formatoptions' , ' += ' , ' j ' , 0 )
107108endif
108109
109110" Replace the check for a tags file in the parent directory of the current
@@ -123,17 +124,17 @@ if !empty(&viminfo)
123124endif
124125" Saving options in session and view files causes more problems than it
125126" solves, so disable it.
126- set sessionoptions -= options
127- set viewoptions -= options
127+ call s: DefaultMod ( ' sessionoptions' , ' -= ' , ' options' , 0 )
128+ call s: DefaultMod ( ' viewoptions' , ' -= ' , ' options' , 0 )
128129
129130" Allow color schemes to do bright colors without forcing bold.
130131if &t_Co == 8 && $TERM !~# ' ^Eterm'
131- set t_Co = 16
132+ call s: Default ( ' t_Co' , ' 16 ' , 0 )
132133endif
133134
134135" If the running Vim lacks support for the Fish shell, use Bash instead.
135136if &shell = ~# ' fish$' && (v: version < 704 || v: version == 704 && ! has (' patch276' ))
136- set shell = /usr/ bin /env\ bash
137+ call s: Default ( ' shell' , ' /usr/bin/env\ bash' , 0 )
137138endif
138139
139140" Disable a legacy behavior that can break plugin maps.
0 commit comments