vim: Fix relative line motion
Before this change up and down were in display co-ordinates, after this
change they are in fold coordinates (which matches the vim behaviour).
To make this work without causing usabliity problems, a bunch of extra
keyboard shortcuts now work:
- vim: `z {o,c}` to open,close a fold
- vim: `z f` to fold current visual selection
- vim: `g {j,k,up,down}` to move up/down a display line
- vim: `g {0,^,$,home,end}` to get to start/end of a display line
Fixes: zed-industries/community#1562
2023-08-25 07:11:51 +03:00
|
|
|
{"SetOption":{"value":"wrap"}}
|
|
|
|
{"SetOption":{"value":"columns=12"}}
|
|
|
|
{"Put":{"state":"tˇwelve char twelve char\ntwelve char\n"}}
|
|
|
|
{"Key":"j"}
|
|
|
|
{"Get":{"state":"twelve char twelve char\ntˇwelve char\n","mode":"Normal"}}
|
|
|
|
{"Key":"k"}
|
|
|
|
{"Get":{"state":"tˇwelve char twelve char\ntwelve char\n","mode":"Normal"}}
|
|
|
|
{"Key":"g"}
|
|
|
|
{"Key":"j"}
|
|
|
|
{"Get":{"state":"twelve char tˇwelve char\ntwelve char\n","mode":"Normal"}}
|
|
|
|
{"Key":"g"}
|
|
|
|
{"Key":"j"}
|
|
|
|
{"Get":{"state":"twelve char twelve char\ntˇwelve char\n","mode":"Normal"}}
|
|
|
|
{"Key":"g"}
|
|
|
|
{"Key":"k"}
|
|
|
|
{"Get":{"state":"twelve char tˇwelve char\ntwelve char\n","mode":"Normal"}}
|
|
|
|
{"Key":"g"}
|
|
|
|
{"Key":"^"}
|
|
|
|
{"Get":{"state":"twelve char ˇtwelve char\ntwelve char\n","mode":"Normal"}}
|
|
|
|
{"Key":"^"}
|
|
|
|
{"Get":{"state":"ˇtwelve char twelve char\ntwelve char\n","mode":"Normal"}}
|
|
|
|
{"Key":"g"}
|
|
|
|
{"Key":"$"}
|
|
|
|
{"Get":{"state":"twelve charˇ twelve char\ntwelve char\n","mode":"Normal"}}
|
|
|
|
{"Key":"$"}
|
|
|
|
{"Get":{"state":"twelve char twelve chaˇr\ntwelve char\n","mode":"Normal"}}
|
2023-08-25 07:48:58 +03:00
|
|
|
{"Put":{"state":"tˇwelve char twelve char\ntwelve char\n"}}
|
|
|
|
{"Key":"enter"}
|
|
|
|
{"Get":{"state":"twelve char twelve char\nˇtwelve char\n","mode":"Normal"}}
|
|
|
|
{"Put":{"state":"twelve char\ntˇwelve char twelve char\ntwelve char\n"}}
|
|
|
|
{"Key":"o"}
|
|
|
|
{"Key":"o"}
|
|
|
|
{"Key":"escape"}
|
|
|
|
{"Get":{"state":"twelve char\ntwelve char twelve char\nˇo\ntwelve char\n","mode":"Normal"}}
|
|
|
|
{"Put":{"state":"twelve char\ntˇwelve char twelve char\ntwelve char\n"}}
|
|
|
|
{"Key":"shift-a"}
|
|
|
|
{"Key":"a"}
|
|
|
|
{"Key":"escape"}
|
|
|
|
{"Get":{"state":"twelve char\ntwelve char twelve charˇa\ntwelve char\n","mode":"Normal"}}
|
|
|
|
{"Key":"shift-i"}
|
|
|
|
{"Key":"i"}
|
|
|
|
{"Key":"escape"}
|
|
|
|
{"Get":{"state":"twelve char\nˇitwelve char twelve chara\ntwelve char\n","mode":"Normal"}}
|
|
|
|
{"Key":"shift-d"}
|
|
|
|
{"Get":{"state":"twelve char\nˇ\ntwelve char\n","mode":"Normal"}}
|
|
|
|
{"Put":{"state":"twelve char\ntwelve char tˇwelve char\ntwelve char\n"}}
|
|
|
|
{"Key":"shift-o"}
|
|
|
|
{"Key":"o"}
|
|
|
|
{"Key":"escape"}
|
|
|
|
{"Get":{"state":"twelve char\nˇo\ntwelve char twelve char\ntwelve char\n","mode":"Normal"}}
|
2023-08-28 20:47:37 +03:00
|
|
|
{"Put":{"state":"fourteen chaˇr\nfourteen char\n"}}
|
|
|
|
{"Key":"d"}
|
|
|
|
{"Key":"i"}
|
|
|
|
{"Key":"w"}
|
|
|
|
{"Get":{"state":"fourteenˇ \nfourteen char\n","mode":"Normal"}}
|
2023-09-07 19:42:47 +03:00
|
|
|
{"Key":"j"}
|
|
|
|
{"Key":"shift-f"}
|
|
|
|
{"Key":"e"}
|
|
|
|
{"Key":"f"}
|
|
|
|
{"Key":"r"}
|
|
|
|
{"Get":{"state":"fourteen \nfourteen chaˇr\n","mode":"Normal"}}
|