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 04:11:51 +00:00
|
|
|
{"SetOption":{"value":"foldmethod=manual"}}
|
|
|
|
{"Put":{"state":"fn boop() {\n ˇbarp()\n bazp()\n}\n"}}
|
|
|
|
{"Key":"shift-v"}
|
|
|
|
{"Key":"j"}
|
|
|
|
{"Key":"z"}
|
|
|
|
{"Key":"f"}
|
|
|
|
{"Key":"escape"}
|
|
|
|
{"Key":"g"}
|
|
|
|
{"Key":"g"}
|
|
|
|
{"Get":{"state":"ˇfn boop() {\n barp()\n bazp()\n}\n","mode":"Normal"}}
|
|
|
|
{"Key":"j"}
|
|
|
|
{"Key":"j"}
|
|
|
|
{"Get":{"state":"fn boop() {\n barp()\n bazp()\nˇ}\n","mode":"Normal"}}
|
|
|
|
{"Key":"2"}
|
|
|
|
{"Key":"k"}
|
|
|
|
{"Get":{"state":"ˇfn boop() {\n barp()\n bazp()\n}\n","mode":"Normal"}}
|
|
|
|
{"Key":"down"}
|
|
|
|
{"Key":"y"}
|
|
|
|
{"Key":"y"}
|
2024-05-11 18:04:05 +00:00
|
|
|
{"Get":{"state":"fn boop() {\nˇ barp()\n bazp()\n}\n","mode":"Normal"}}
|
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 04:11:51 +00:00
|
|
|
{"ReadRegister":{"name":"\"","value":" barp()\n bazp()\n"}}
|
|
|
|
{"Key":"z"}
|
|
|
|
{"Key":"o"}
|
|
|
|
{"Get":{"state":"fn boop() {\nˇ barp()\n bazp()\n}\n","mode":"Normal"}}
|