Julian / Julian/dotfiles

Make swap-quote-keys better

Open
#61 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Perl
Stars
54
Forks
5
Avg merge
2d 17h
Merged PRs (30d)
4

Description

For some reason I need two ^Qs, and it doesn't work with multi-line editing.

An alternate version like:

```
local c LBUFFER=$PREBUFFER$LBUFFER

for (( c = $#LBUFFER; c > 0; c-- )); do
if [[ $LBUFFER[c] == \' ]]; then
LBUFFER[c]=\"
break
elif [[ $LBUFFER[c] == \" ]]; then
LBUFFER[c]=\'
break
fi
done

print -rz -- $LBUFFER$RBUFFER
zle send-break
```

would, but should change that so that it only uses that way if it's multiline, otherwise with single-line input, the `send-break` causes duplicate lines.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.