A fish shell plugin to add matching brackets or quotes – like autopairs, but manually.
Autopair plugins are nice most of the time. And then all of them eventually insert/skip/add a bracket or quote against your intention. It tends to make me furious.
Here's an alternative.
Before: (|
Press <Tab>
.
After: (|)
Supports () [] {} <> "" '' `` »« „“
fisher install bagohart/manual-pair-close.fish
Copy the files _manual_close_pair.fish
and _manual_close_pair_or_complete.fish
into $XDG_CONFIG_HOME/fish/functions/
(probably ~/.config/fish/functions
).
This plugin does not add any mappings, add them yourself in your config.fish
.
To overload <Tab>
, add
bind \t _manual_close_pair_or_complete
For any other key, e.g. <CTRL-Space>
bind -k nul _manual_close_pair
Autopair plugins exist:
https://github.com/jorgebucaran/autopair.fish
https://github.com/laughedelic/pisces
I don't know of any manual pair plugins like this one.