diff --git a/test/old/testdir/setup.vim b/test/old/testdir/setup.vim index 23ada4b84f..29146725a2 100644 --- a/test/old/testdir/setup.vim +++ b/test/old/testdir/setup.vim @@ -36,9 +36,11 @@ if exists('s:did_load') set isfname+=: endif if g:testname !~ 'test_mapping\.vim$' - " Make "Q" switch to Ex mode. + " Make "Q" behave like normal Ex mode. " This does not work for all tests as Nvim only supports Vim Ex mode. nnoremap Q 1q:callExStart() + " Make "gQ" go to Vim Ex mode. + noremap gQ 1q: endif endif diff --git a/test/old/testdir/test_cmdline.vim b/test/old/testdir/test_cmdline.vim index 0369b15b8f..b3acb81a2e 100644 --- a/test/old/testdir/test_cmdline.vim +++ b/test/old/testdir/test_cmdline.vim @@ -2606,7 +2606,7 @@ func Test_cmdwin_ex_mode_with_modifier() " this was accessing memory after allocated text in Ex mode new call setline(1, ['some', 'text', 'lines']) - silent! call feedkeys("1q:normal vq:atopleft\\\", 'xt') + silent! call feedkeys("gQnormal vq:atopleft\\\", 'xt') bwipe! endfunc diff --git a/test/old/testdir/test_ex_mode.vim b/test/old/testdir/test_ex_mode.vim index a3d2c85be7..60ffa949a7 100644 --- a/test/old/testdir/test_ex_mode.vim +++ b/test/old/testdir/test_ex_mode.vim @@ -71,7 +71,7 @@ func Test_Ex_substitute() call term_sendkeys(buf, ":call setline(1, repeat(['foo foo'], 4))\") call term_sendkeys(buf, ":set number\") - call term_sendkeys(buf, "1q:") + call term_sendkeys(buf, "gQ") call WaitForAssert({-> assert_match(':', term_getline(buf, 6))}, 1000) call term_sendkeys(buf, "%s/foo/bar/gc\") @@ -217,7 +217,7 @@ func Test_Ex_append_in_loop() CheckRunVimInTerminal let buf = RunVimInTerminal('', {'rows': 6}) - call term_sendkeys(buf, "1q:") + call term_sendkeys(buf, "gQ") call term_sendkeys(buf, "for i in range(1)\") call term_sendkeys(buf, "append\") call WaitForAssert({-> assert_match(': append', term_getline(buf, 5))}, 1000) @@ -275,13 +275,13 @@ func Test_ex_mode_errors() func ExEnterFunc() endfunc - call feedkeys("1q:vi\r", 'xt') + call feedkeys("gQvi\r", 'xt') au! CmdLineEnter delfunc ExEnterFunc au CmdlineEnter * : - call feedkeys("1q:echo 1\r", 'xt') + call feedkeys("gQecho 1\r", 'xt') au! CmdlineEnter @@ -337,7 +337,7 @@ func Test_ex_mode_large_indent() new set ts=500 ai call setline(1, "\t") - exe "normal 1q:i\." + exe "normal gQi\." set ts=8 noai bwipe! endfunc