diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/runtest.vim | 6 | ||||
-rw-r--r-- | src/nvim/testdir/setup.vim | 61 |
2 files changed, 34 insertions, 33 deletions
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index d0a666a049..7060cab2e5 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -153,6 +153,9 @@ func RunTheTest(test) " directory after executing the test. let save_cwd = getcwd() + " Align Nvim defaults to Vim. + source setup.vim + if exists("*SetUp") try call SetUp() @@ -191,9 +194,6 @@ func RunTheTest(test) endtry endif - " Align Nvim defaults to Vim. - source setup.vim - " Clear any autocommands and put back the catch-all for SwapExists. au! au SwapExists * call HandleSwapExists() diff --git a/src/nvim/testdir/setup.vim b/src/nvim/testdir/setup.vim index f8db2ea120..e6c0762729 100644 --- a/src/nvim/testdir/setup.vim +++ b/src/nvim/testdir/setup.vim @@ -1,33 +1,34 @@ -" 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 noruler noshowcmd -set nohlsearch noincsearch -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 +if exists('s:did_load') + " 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 noruler noshowcmd + set nohlsearch noincsearch + 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 +endif " Common preparations for running tests. |