zed/crates/vim/test_data/test_percent_in_comment.json
Rocky Shi 648d1de26b
vim: Implement text-based matching bracket logic for Vim '%' motion to correctly find pairs within comments (#45559)
Closes #25435

Release Notes:

- Improved vim's '%' motion to always fall back to text-based bracket
matching when language-aware matching fails
2026-01-08 16:35:30 +00:00

62 lines
2 KiB
JSON

{"Put":{"state":"// ˇconsole.log(var);"}}
{"Key":"%"}
{"Get":{"state":"// console.log(varˇ);","mode":"Normal"}}
{"Put":{"state":"// console.logˇ(var);"}}
{"Key":"%"}
{"Get":{"state":"// console.log(varˇ);","mode":"Normal"}}
{"Put":{"state":"// console.log(ˇvar);"}}
{"Key":"%"}
{"Get":{"state":"// console.logˇ(var);","mode":"Normal"}}
{"Put":{"state":"// console.log(vaˇr);"}}
{"Key":"%"}
{"Get":{"state":"// console.logˇ(var);","mode":"Normal"}}
{"Put":{"state":"// console.log(varˇ);"}}
{"Key":"%"}
{"Get":{"state":"// console.logˇ(var);","mode":"Normal"}}
{"Put":{"state":"// console.log(var)ˇ;"}}
{"Key":"%"}
{"Get":{"state":"// console.log(var)ˇ;","mode":"Normal"}}
{"Put":{"state":"// ˇ{ {} }"}}
{"Key":"%"}
{"Get":{"state":"// { {} ˇ}","mode":"Normal"}}
{"Put":{"state":"// { ˇ{} }"}}
{"Key":"%"}
{"Get":{"state":"// { {ˇ} }","mode":"Normal"}}
{"Key":"%"}
{"Get":{"state":"// { ˇ{} }","mode":"Normal"}}
{"Put":{"state":"// { {}ˇ }"}}
{"Key":"%"}
{"Get":{"state":"// ˇ{ {} }","mode":"Normal"}}
{"Put":{"state":"// { {} }ˇ"}}
{"Key":"%"}
{"Get":{"state":"// ˇ{ {} }","mode":"Normal"}}
{"Put":{"state":"ˇ{% block %}"}}
{"Key":"%"}
{"Get":{"state":"{% block %ˇ}","mode":"Normal"}}
{"Put":{"state":"{ˇ% block %}"}}
{"Key":"%"}
{"Get":{"state":"ˇ{% block %}","mode":"Normal"}}
{"Put":{"state":"{% block %ˇ}"}}
{"Key":"%"}
{"Get":{"state":"ˇ{% block %}","mode":"Normal"}}
{"Put":{"state":"{% block %}ˇ"}}
{"Key":"%"}
{"Get":{"state":"ˇ{% block %}","mode":"Normal"}}
{"Put":{"state":"ˇ{{ var }}"}}
{"Key":"%"}
{"Get":{"state":"{{ var }ˇ}","mode":"Normal"}}
{"Put":{"state":"{ˇ{ var }}"}}
{"Key":"%"}
{"Get":{"state":"{{ var ˇ}}","mode":"Normal"}}
{"Put":{"state":"{{ˇ var }}"}}
{"Key":"%"}
{"Get":{"state":"{ˇ{ var }}","mode":"Normal"}}
{"Put":{"state":"{{ var ˇ}}"}}
{"Key":"%"}
{"Get":{"state":"{ˇ{ var }}","mode":"Normal"}}
{"Put":{"state":"{{ var }ˇ}"}}
{"Key":"%"}
{"Get":{"state":"ˇ{{ var }}","mode":"Normal"}}
{"Put":{"state":"{{ var }}ˇ"}}
{"Key":"%"}
{"Get":{"state":"ˇ{{ var }}","mode":"Normal"}}