Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make swap-quote-keys better #61

Open
Julian opened this issue Feb 21, 2020 · 1 comment
Open

Make swap-quote-keys better #61

Julian opened this issue Feb 21, 2020 · 1 comment

Comments

@Julian
Copy link
Owner

Julian commented Feb 21, 2020

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.

@Julian
Copy link
Owner Author

Julian commented Mar 29, 2020

g x "It's a good song OK? -> g x 'It''s a good song OK?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant