vim: ALlow counts on insert actions
This re-uses the existing repeat infrastructure.
This commit is contained in:
parent
cee549e1ef
commit
d868d00985
8 changed files with 343 additions and 132 deletions
36
crates/vim/test_data/test_insert_with_counts.json
Normal file
36
crates/vim/test_data/test_insert_with_counts.json
Normal file
|
@ -0,0 +1,36 @@
|
|||
{"Put":{"state":"ˇhello\n"}}
|
||||
{"Key":"5"}
|
||||
{"Key":"i"}
|
||||
{"Key":"-"}
|
||||
{"Key":"escape"}
|
||||
{"Get":{"state":"----ˇ-hello\n","mode":"Normal"}}
|
||||
{"Put":{"state":"ˇhello\n"}}
|
||||
{"Key":"5"}
|
||||
{"Key":"a"}
|
||||
{"Key":"-"}
|
||||
{"Key":"escape"}
|
||||
{"Get":{"state":"h----ˇ-ello\n","mode":"Normal"}}
|
||||
{"Key":"4"}
|
||||
{"Key":"shift-i"}
|
||||
{"Key":"-"}
|
||||
{"Key":"escape"}
|
||||
{"Get":{"state":"---ˇ-h-----ello\n","mode":"Normal"}}
|
||||
{"Key":"3"}
|
||||
{"Key":"shift-a"}
|
||||
{"Key":"-"}
|
||||
{"Key":"escape"}
|
||||
{"Get":{"state":"----h-----ello--ˇ-\n","mode":"Normal"}}
|
||||
{"Put":{"state":"ˇhello\n"}}
|
||||
{"Key":"3"}
|
||||
{"Key":"o"}
|
||||
{"Key":"o"}
|
||||
{"Key":"i"}
|
||||
{"Key":"escape"}
|
||||
{"Get":{"state":"hello\noi\noi\noˇi\n","mode":"Normal"}}
|
||||
{"Put":{"state":"ˇhello\n"}}
|
||||
{"Key":"3"}
|
||||
{"Key":"shift-o"}
|
||||
{"Key":"o"}
|
||||
{"Key":"i"}
|
||||
{"Key":"escape"}
|
||||
{"Get":{"state":"oi\noi\noˇi\nhello\n","mode":"Normal"}}
|
23
crates/vim/test_data/test_insert_with_repeat.json
Normal file
23
crates/vim/test_data/test_insert_with_repeat.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{"Put":{"state":"ˇhello\n"}}
|
||||
{"Key":"3"}
|
||||
{"Key":"i"}
|
||||
{"Key":"-"}
|
||||
{"Key":"escape"}
|
||||
{"Get":{"state":"--ˇ-hello\n","mode":"Normal"}}
|
||||
{"Key":"."}
|
||||
{"Get":{"state":"----ˇ--hello\n","mode":"Normal"}}
|
||||
{"Key":"2"}
|
||||
{"Key":"."}
|
||||
{"Get":{"state":"-----ˇ---hello\n","mode":"Normal"}}
|
||||
{"Put":{"state":"ˇhello\n"}}
|
||||
{"Key":"2"}
|
||||
{"Key":"o"}
|
||||
{"Key":"k"}
|
||||
{"Key":"k"}
|
||||
{"Key":"escape"}
|
||||
{"Get":{"state":"hello\nkk\nkˇk\n","mode":"Normal"}}
|
||||
{"Key":"."}
|
||||
{"Get":{"state":"hello\nkk\nkk\nkk\nkˇk\n","mode":"Normal"}}
|
||||
{"Key":"1"}
|
||||
{"Key":"."}
|
||||
{"Get":{"state":"hello\nkk\nkk\nkk\nkk\nkˇk\n","mode":"Normal"}}
|
Loading…
Add table
Add a link
Reference in a new issue