vim: Add g M motion to go to the middle of a line (#30227)

Adds the "g M" vim motion to go to the middle of the line.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
Alex Shen 2025-05-16 14:21:30 -07:00 committed by GitHub
parent c7725e31d9
commit d791c6cdb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 146 additions and 0 deletions

View file

@ -0,0 +1,34 @@
{"Put":{"state":"ˇthe quick brown fox\njumped over the lazy dog"}}
{"Key":"d"}
{"Key":"v"}
{"Key":"g"}
{"Key":"shift-m"}
{"Get":{"state":"ˇbrown fox\njumped over the lazy dog","mode":"Normal"}}
{"Put":{"state":"the quick bˇrown fox\njumped over the lazy dog"}}
{"Key":"d"}
{"Key":"v"}
{"Key":"g"}
{"Key":"shift-m"}
{"Get":{"state":"the quickˇown fox\njumped over the lazy dog","mode":"Normal"}}
{"Put":{"state":"the quick brown foˇx\njumped over the lazy dog"}}
{"Key":"d"}
{"Key":"v"}
{"Key":"g"}
{"Key":"shift-m"}
{"Get":{"state":"the quicˇk\njumped over the lazy dog","mode":"Normal"}}
{"Put":{"state":"ˇthe quick brown fox\njumped over the lazy dog"}}
{"Key":"d"}
{"Key":"v"}
{"Key":"7"}
{"Key":"5"}
{"Key":"g"}
{"Key":"shift-m"}
{"Get":{"state":"ˇ fox\njumped over the lazy dog","mode":"Normal"}}
{"Put":{"state":"ˇthe quick brown fox\njumped over the lazy dog"}}
{"Key":"d"}
{"Key":"v"}
{"Key":"2"}
{"Key":"3"}
{"Key":"g"}
{"Key":"shift-m"}
{"Get":{"state":"ˇuick brown fox\njumped over the lazy dog","mode":"Normal"}}