From 41c76d9444e3b5ae0ecb35860d4d7378bb19d4a0 Mon Sep 17 00:00:00 2001 From: Felipe Morales Date: Thu, 18 Jun 2015 17:23:29 -0300 Subject: defaults: enable 'smarttab' by default. #2855 --- runtime/doc/options.txt | 2 +- runtime/doc/vim_diff.txt | 1 + src/nvim/option.c | 4 ++-- test/functional/legacy/038_virtual_replace_spec.lua | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 08783ebbf3..daa4ce66b1 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -5862,7 +5862,7 @@ A jump table for the options with a short description can be found at |Q_op|. NOTE: When 'paste' is set smart indenting is disabled. *'smarttab'* *'sta'* *'nosmarttab'* *'nosta'* -'smarttab' 'sta' boolean (default off) +'smarttab' 'sta' boolean (default on) global When on, a in front of a line inserts blanks according to 'shiftwidth'. 'tabstop' or 'softtabstop' is used in other places. A diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index f3f3e961d1..0a26041417 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -33,6 +33,7 @@ these differences. - 'formatoptions' defaults to "tcqj" - 'nocompatible' is always set - 'nrformats' defaults to "hex" +- 'smarttab' is set by default - 'tags' defaults to "./tags;,tags" - 'ttyfast' is always set - 'wildmenu' is set by default diff --git a/src/nvim/option.c b/src/nvim/option.c index 6b91224987..bd6126f238 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -1407,9 +1407,9 @@ static vimoption_T {"smartindent", "si", P_BOOL|P_VI_DEF|P_VIM, (char_u *)&p_si, PV_SI, {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, - {"smarttab", "sta", P_BOOL|P_VI_DEF|P_VIM, + {"smarttab", "sta", P_BOOL|P_VIM, (char_u *)&p_sta, PV_NONE, - {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT}, {"softtabstop", "sts", P_NUM|P_VI_DEF|P_VIM, (char_u *)&p_sts, PV_STS, {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, diff --git a/test/functional/legacy/038_virtual_replace_spec.lua b/test/functional/legacy/038_virtual_replace_spec.lua index 239ffa47e6..94503bd42a 100644 --- a/test/functional/legacy/038_virtual_replace_spec.lua +++ b/test/functional/legacy/038_virtual_replace_spec.lua @@ -10,6 +10,8 @@ describe('Virtual replace mode', function() it('is working', function() -- Make sure that backspace works, no matter what termcap is used. execute('set t_kD=x7f t_kb=x08') + -- Use vi default for 'smarttab' + execute('set nosmarttab') feed('ggdGa') feed('abcdefghi') feed('jklmn') -- cgit