hlissner / zsh-autopair

Auto-close and delete matching delimiters in zsh
MIT License
509 stars 37 forks source link

Feature request: add a function to advance cursor past all end brackets? #24

Open paulreimer opened 4 years ago

paulreimer commented 4 years ago

In some other autopairs plugins (I use https://github.com/LucHermitte/lh-brackets), there is a shortcut to exit out of all matched scopes.

e.g. if you had this function mapped to Ctrl-L: cat ./{staging,prod{A,B|}}.{txt,zip} => Ctrl-L => cat ./{staging,prod{A,B}}|.{txt,zip} but if you used similar to the above (adding quotes for example; now Ctrl-L would move the cursor outside the quotes): cat "./{staging,prod{A,B|}}.{txt,zip}" => Ctrl-L => cat "./{staging,prod{A,B}}.{txt,zip}"|

So it just places the cursor just to the right of all matching brackets, however deeply nested.