diff options
author | Felipe Morales <hel.sheep@gmail.com> | 2015-06-18 17:23:29 -0300 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-06-20 13:45:47 -0400 |
commit | 41c76d9444e3b5ae0ecb35860d4d7378bb19d4a0 (patch) | |
tree | f7ae4e397871ffcee424fac71ce0b05736015350 | |
parent | 8b200f904f33ea55c11735ec2abcf0ab3925a537 (diff) | |
download | rneovim-41c76d9444e3b5ae0ecb35860d4d7378bb19d4a0.tar.gz rneovim-41c76d9444e3b5ae0ecb35860d4d7378bb19d4a0.tar.bz2 rneovim-41c76d9444e3b5ae0ecb35860d4d7378bb19d4a0.zip |
defaults: enable 'smarttab' by default. #2855
-rw-r--r-- | runtime/doc/options.txt | 2 | ||||
-rw-r--r-- | runtime/doc/vim_diff.txt | 1 | ||||
-rw-r--r-- | src/nvim/option.c | 4 | ||||
-rw-r--r-- | 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 <Tab> 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<cr>') feed('abcdefghi<cr>') feed('jk<tab>lmn<cr>') |