aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/setup.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-10 06:59:58 +0800
committerGitHub <noreply@github.com>2022-07-10 06:59:58 +0800
commit880de9a489be57d07416d1de9f869d4cba1e490c (patch)
tree9dc186bdb3300bb1a85610b7b9ea007313262d47 /src/nvim/testdir/setup.vim
parentd6a1e718813f744b997e1b8fc707cbd47125db5c (diff)
downloadrneovim-880de9a489be57d07416d1de9f869d4cba1e490c.tar.gz
rneovim-880de9a489be57d07416d1de9f869d4cba1e490c.tar.bz2
rneovim-880de9a489be57d07416d1de9f869d4cba1e490c.zip
test(old): align defaults to Vim after every test (#19301)
This can avoid divergences from Vim in some small places.
Diffstat (limited to 'src/nvim/testdir/setup.vim')
-rw-r--r--src/nvim/testdir/setup.vim32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/nvim/testdir/setup.vim b/src/nvim/testdir/setup.vim
index ff1ad30b12..f8db2ea120 100644
--- a/src/nvim/testdir/setup.vim
+++ b/src/nvim/testdir/setup.vim
@@ -1,32 +1,42 @@
-" Common preparations for running tests.
-
-" Only load this once.
-if exists('s:did_load')
- finish
-endif
-let s:did_load = 1
-
" Align Nvim defaults to Vim.
set backspace=
+set complete=.,w,b,u,t,i
+set directory&
set directory^=.
set fillchars=vert:\|,fold:-
+set formatoptions=tcq
set fsync
set laststatus=1
set listchars=eol:$
set joinspaces
-set nohidden nosmarttab noautoindent noautoread complete-=i noruler noshowcmd
+set nohidden nosmarttab noautoindent noautoread noruler noshowcmd
set nohlsearch noincsearch
-set nrformats+=octal
-set shortmess-=F
+set nrformats=bin,octal,hex
+set shortmess=filnxtToOS
set sidescroll=0
set tags=./tags,tags
+set undodir&
set undodir^=.
set wildoptions=
set startofline
+set sessionoptions&
set sessionoptions+=options
+set viewoptions&
set viewoptions+=options
set switchbuf=
+" Make "Q" switch to Ex mode.
+" This does not work for all tests.
+nnoremap Q gQ
+
+" Common preparations for running tests.
+
+" Only load this once.
+if exists('s:did_load')
+ finish
+endif
+let s:did_load = 1
+
" Clear Nvim default mappings.
mapclear
mapclear!