aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Morales <hel.sheep@gmail.com>2015-06-18 17:02:38 -0300
committerJustin M. Keyes <justinkz@gmail.com>2015-06-20 14:02:56 -0400
commit8e3f67f2a0166994925af75c0efa972d76ea82de (patch)
treef2913183c74950a7b9a7396044403682ca96d2c0
parent81847da948b91a77d55fd2245fff3fc5cf8e6310 (diff)
downloadrneovim-8e3f67f2a0166994925af75c0efa972d76ea82de.tar.gz
rneovim-8e3f67f2a0166994925af75c0efa972d76ea82de.tar.bz2
rneovim-8e3f67f2a0166994925af75c0efa972d76ea82de.zip
defaults: enable 'autoindent' #2857
Re: https://github.com/neovim/neovim/issues/2676
-rw-r--r--runtime/doc/options.txt2
-rw-r--r--runtime/doc/vim_diff.txt1
-rw-r--r--src/nvim/option.c4
-rw-r--r--test/functional/helpers.lua3
4 files changed, 6 insertions, 4 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 9001256cdf..5726de6503 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -718,7 +718,7 @@ A jump table for the options with a short description can be found at |Q_op|.
further details see |arabic.txt|.
*'autoindent'* *'ai'* *'noautoindent'* *'noai'*
-'autoindent' 'ai' boolean (default off)
+'autoindent' 'ai' boolean (default on)
local to buffer
Copy indent from current line when starting a new line (typing <CR>
in Insert mode or when using the "o" or "O" command). If you do not
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 1d2b695470..ca2b3ec8ad 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -29,6 +29,7 @@ these differences.
2. Option defaults *nvim-option-defaults*
- 'autoread' is set by default
+- 'autoindent' is set by default.
- 'backspace' defaults to "indent,eol,start"
- 'encoding' defaults to "utf-8"
- 'formatoptions' defaults to "tcqj"
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 923c2e3748..d2361c1875 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -412,9 +412,9 @@ static vimoption_T
{"autochdir", "acd", P_BOOL|P_VI_DEF,
(char_u *)&p_acd, PV_NONE,
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
- {"autoindent", "ai", P_BOOL|P_VI_DEF,
+ {"autoindent", "ai", P_BOOL,
(char_u *)&p_ai, PV_AI,
- {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
{"autoread", "ar", P_BOOL|P_VIM,
(char_u *)&p_ar, PV_AR,
{(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 27c94c34a8..3d02aa7fdd 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -6,8 +6,9 @@ local AsyncSession = require('nvim.async_session')
local Session = require('nvim.session')
local nvim_prog = os.getenv('NVIM_PROG') or 'build/bin/nvim'
+--- FIXME: 'autoindent' messes up the insert() function
local nvim_argv = {nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N',
- '--cmd', 'set shortmess+=I background=light noswapfile',
+ '--cmd', 'set shortmess+=I background=light noswapfile noautoindent',
'--embed'}
-- Formulate a path to the directory containing nvim. We use this to