vim: Add support for temporary normal mode (ctrl-o) within insert mode (#19454)
Support has been added for the ctrl-o command within insert mode. Ctrl-o is used to partially enter normal mode for 1 motion to then return back into insert mode. Release Notes: - vim: Added support for `ctrl-o` in insert mode to enter temporary normal mode --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
parent
254ce74036
commit
b1cd9e4d24
14 changed files with 145 additions and 11 deletions
11
crates/vim/test_data/test_ctrl_o_dot.json
Normal file
11
crates/vim/test_data/test_ctrl_o_dot.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{"Put":{"state":"heˇllo world."}}
|
||||
{"Key":"x"}
|
||||
{"Key":"i"}
|
||||
{"Key":"ctrl-o"}
|
||||
{"Key":"."}
|
||||
{"Get":{"state":"heˇo world.","mode":"Insert"}}
|
||||
{"Key":"l"}
|
||||
{"Key":"l"}
|
||||
{"Key":"escape"}
|
||||
{"Key":"."}
|
||||
{"Get":{"state":"hellˇllo world.","mode":"Normal"}}
|
10
crates/vim/test_data/test_ctrl_o_position.json
Normal file
10
crates/vim/test_data/test_ctrl_o_position.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{"Put":{"state":"helˇlo world."}}
|
||||
{"Key":"i"}
|
||||
{"Key":"ctrl-o"}
|
||||
{"Key":"d"}
|
||||
{"Key":"i"}
|
||||
{"Key":"w"}
|
||||
{"Get":{"state":"ˇ world.","mode":"Insert"}}
|
||||
{"Key":"ctrl-o"}
|
||||
{"Key":"p"}
|
||||
{"Get":{"state":" helloˇworld.","mode":"Insert"}}
|
14
crates/vim/test_data/test_ctrl_o_visual.json
Normal file
14
crates/vim/test_data/test_ctrl_o_visual.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{"Put":{"state":"helloˇ world."}}
|
||||
{"Key":"i"}
|
||||
{"Key":"ctrl-o"}
|
||||
{"Key":"v"}
|
||||
{"Key":"b"}
|
||||
{"Key":"r"}
|
||||
{"Key":"l"}
|
||||
{"Get":{"state":"ˇllllllworld.","mode":"Insert"}}
|
||||
{"Key":"ctrl-o"}
|
||||
{"Key":"v"}
|
||||
{"Key":"f"}
|
||||
{"Key":"w"}
|
||||
{"Key":"d"}
|
||||
{"Get":{"state":"ˇorld.","mode":"Insert"}}
|
Loading…
Add table
Add a link
Reference in a new issue