vim: Implement <count>% motion (#25839)
Closes https://github.com/zed-industries/zed/discussions/25665 > Currently Zed is missing quite an useful Vim motion: <count>% (go to {count} percentage in the file). Description: {count}% - Go to {count} percentage in the file, on the first non-blank in the line linewise. To compute the new line number this formula is used: ({count} * number-of-lines + 99) / 100 . > [Link](https://neovim.io/doc/user/motion.html#N%25). Release Notes: - vim: Added `<count>%` motion --------- Co-authored-by: Conrad Irwin <conrad@zed.dev>
This commit is contained in:
co-authored by
Conrad Irwin
parent
314ad5dd5f
commit
22b1a02e23
@@ -0,0 +1,26 @@
|
||||
{"Put":{"state":"The ˇquick brown\nfox jumps over\nthe lazy dog\nThe quick brown\nfox jumps over\nthe lazy dog\nThe quick brown\nfox jumps over\nthe lazy dog"}}
|
||||
{"Key":"2"}
|
||||
{"Key":"0"}
|
||||
{"Key":"%"}
|
||||
{"Get":{"state":"The quick brown\nfox ˇjumps over\nthe lazy dog\nThe quick brown\nfox jumps over\nthe lazy dog\nThe quick brown\nfox jumps over\nthe lazy dog","mode":"Normal"}}
|
||||
{"Key":"2"}
|
||||
{"Key":"5"}
|
||||
{"Key":"%"}
|
||||
{"Get":{"state":"The quick brown\nfox jumps over\nthe ˇlazy dog\nThe quick brown\nfox jumps over\nthe lazy dog\nThe quick brown\nfox jumps over\nthe lazy dog","mode":"Normal"}}
|
||||
{"Key":"7"}
|
||||
{"Key":"5"}
|
||||
{"Key":"%"}
|
||||
{"Get":{"state":"The quick brown\nfox jumps over\nthe lazy dog\nThe quick brown\nfox jumps over\nthe lazy dog\nThe ˇquick brown\nfox jumps over\nthe lazy dog","mode":"Normal"}}
|
||||
{"Put":{"state":"The ˇquick brown\nfox jumps over\nthe lazy dog\nThe quick brown\nfox jumps over\nthe lazy dog\nThe quick brown\nfox jumps over\nthe lazy dog"}}
|
||||
{"Key":"v"}
|
||||
{"Key":"5"}
|
||||
{"Key":"0"}
|
||||
{"Key":"%"}
|
||||
{"Get":{"state":"The «quick brown\nfox jumps over\nthe lazy dog\nThe quick brown\nfox jˇ»umps over\nthe lazy dog\nThe quick brown\nfox jumps over\nthe lazy dog","mode":"Visual"}}
|
||||
{"Put":{"state":"The ˇquick brown\nfox jumps over\nthe lazy dog\nThe quick brown\nfox jumps over\nthe lazy dog\nThe quick brown\nfox jumps over\nthe lazy dog"}}
|
||||
{"Key":"v"}
|
||||
{"Key":"1"}
|
||||
{"Key":"0"}
|
||||
{"Key":"0"}
|
||||
{"Key":"%"}
|
||||
{"Get":{"state":"The «quick brown\nfox jumps over\nthe lazy dog\nThe quick brown\nfox jumps over\nthe lazy dog\nThe quick brown\nfox jumps over\nthe lˇ»azy dog","mode":"Visual"}}
|
||||
Reference in New Issue
Block a user