Lines Matching refs:mode
75 " mapping of ctrl-c in Insert mode
87 " mapping of ctrl-c in Visual mode
98 " check langmap applies in normal mode
139 " langmap should not apply in insert mode, 'langremap' doesn't matter
147 " langmap used for register name in insert mode.
164 " langmap should not apply in Command-line mode
355 let g:m=mode(1)
622 " Insert mode mapping
628 " Normal mode mapping
635 " Visual and Select mode mapping
645 " Visual mode mapping
653 " Select mode mapping
661 " Operator-pending mode mapping
673 " Cmdline mode mapping
852 call assert_equal(['foo', 'bar', '!'], [d.lhs, d.rhs, d.mode])
876 call assert_equal(['x\k', 'Test', 'i'], [d.lhs, d.rhs, d.mode])
883 call assert_equal(['x<Bslash>k', 'Test', 'i'], [d.lhs, d.rhs, d.mode])
911 " works in various modes and sees the correct mode()
912 noremap <F3> <Cmd>let m = mode(1)<CR>
913 noremap! <F3> <Cmd>let m = mode(1)<CR>
915 " normal mode
919 " visual mode
922 " shouldn't leave the visual mode
923 call assert_equal('v', mode(1))
925 call assert_equal('n', mode(1))
927 " visual mapping in select mode
930 " shouldn't leave select mode
931 call assert_equal('s', mode(1))
933 call assert_equal('n', mode(1))
935 " select mode mapping
936 snoremap <F3> <Cmd>let m = mode(1)<cr>
939 " shouldn't leave select mode
940 call assert_equal('s', mode(1))
942 call assert_equal('n', mode(1))
944 " operator-pending mode
947 " leaves the operator-pending mode
948 call assert_equal('n', mode(1))
950 " insert mode
955 " replace mode
960 " virtual replace mode
966 " cmdline mode
971 " terminal mode
973 tnoremap <F3> <Cmd>let m = mode(1)<CR>
977 call assert_equal('t', mode(1))
984 " invoke cmdline mode recursively
1015 " text object enters visual mode
1017 if mode() !=# "v"
1037 call s:cmdmap('<F3>', 'let m = mode(1)')
1057 " Test for <Cmd> mapping in normal mode
1063 call s:cmdmap('<F2>', 'let s = [mode(1), v:count, v:register]')
1097 " feedkeys(..., 'x') is executed immediately, but insert mode is aborted
1149 " Test for <Cmd> mapping in visual mode
1157 call assert_equal(['v', 1, 12], [mode(1), col('v'), col('.')])
1159 " can invoke an operator, ending the visual mode
1162 call assert_equal('n', mode(1))
1165 " error doesn't interrupt visual mode
1167 call assert_equal(['v', 1, 6], [mode(1), col('v'), col('.')])
1169 call assert_equal(['v', 1, 3, 2, 4], [mode(1), line('v'), col('v'), line('.'), col('.')])
1171 " startinsert gives "-- (insert) VISUAL --" mode
1173 call assert_equal(['v', 1, 3, 2, 4], [mode(1), line('v'), col('v'), line('.'), col('.')])
1184 " Test for <Cmd> mapping in select mode
1195 call assert_equal(['s', 1, 12], [mode(1), col('v'), col('.')])
1199 " visual mapping in select mode restarts select mode after operator
1202 call assert_equal('s', mode(1))
1205 " select mode mapping works, and does not restart select mode
1208 call assert_equal('n', mode(1))
1211 " error doesn't interrupt temporary visual mode
1215 " quirk: restoration of select mode is not performed
1216 call assert_equal(['v', 1, 6], [mode(1), col('v'), col('.')])
1218 " error doesn't interrupt select mode
1222 call assert_equal(['s', 1, 6], [mode(1), col('v'), col('.')])
1227 call assert_equal(['s', 1, 3, 2, 4], [mode(1), line('v'), col('v'), line('.'), col('.')])
1229 " startinsert gives "-- SELECT (insert) --" mode
1233 call assert_equal(['s', 1, 3, 2, 4], [mode(1), line('v'), col('v'), line('.'), col('.')])
1244 " Test for <Cmd> mapping in operator-pending mode
1281 " Test for <Cmd> mapping in insert mode
1293 " Note when entering visual mode from InsertEnter autocmd, an async event,
1294 " or a <Cmd> mapping, vim ends up in undocumented "INSERT VISUAL" mode.
1297 call assert_equal(['v', 1, 3, 2, 9], [mode(1), line('v'), col('v'), line('.'), col('.')])
1322 " Test for <Cmd> mapping in insert-completion mode
1336 " Test for <Cmd> mapping in cmdline mode
1347 " exception doesn't leave cmdline mode
1351 " move cursor in the buffer from cmdline mode
1356 " :startinsert takes effect after leaving cmdline mode