dotfiles/fish/functions/_autopair_backspace.fish
Julius Klotz e1f49b8878 initial commit
2025-02-21 11:32:33 +01:00

10 lines
323 B
Fish

function _autopair_backspace
set --local index (commandline --cursor)
set --local buffer (commandline)
test $index -ge 1 &&
contains -- (string sub --start=$index --length=2 -- "$buffer") $autopair_pairs &&
commandline --function delete-char
commandline --function backward-delete-char
end