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

paredit.killSexpForward should copy deleted code to clipboard #1283

Closed
xfthhxk opened this issue Aug 29, 2021 · 3 comments
Closed

paredit.killSexpForward should copy deleted code to clipboard #1283

xfthhxk opened this issue Aug 29, 2021 · 3 comments

Comments

@xfthhxk
Copy link
Contributor

xfthhxk commented Aug 29, 2021

Firstly, thanks so much for Calva! I'm coming from a Spacemacs/emacs background where killing an s-expression copies the s-expression to the clipboard which makes moving code around much easier. I'd like to see paredit.killSexpForward and paredit.killSexpBackward copy the deleted text to the clipboard.

xfthhxk added a commit to xfthhxk/calva that referenced this issue Aug 29, 2021
xfthhxk added a commit to xfthhxk/calva that referenced this issue Aug 30, 2021
@PEZ
Copy link
Collaborator

PEZ commented Aug 30, 2021

Hello, thanks for the feature request! It has been discussed before in #559, and then concluded that there is another extension that lets you chain the paredit.Select* commands and Cut to Clipboard, which achieves this effect.

As is also discussed there is that this is pretty uncommon behaviour for VS Code. It would come as a surprise that deleting something also overwrites what was previously on your clipboard.

Using that other extension is a bit unconvenient and adds setup, granted, and also a bit hard to discover. So I'm leaning towards that we should build it in to Calva Paredit, as your PR has started to do. If so we should:

  1. Place it behind a setting (maybe calva.paredit.killAlsoCutsToClipboard that is default off.
  2. Make it consistent over all Kill commands.
  3. Document it. Probaby here: https://calva.io/paredit/#editing

@xfthhxk
Copy link
Contributor Author

xfthhxk commented Aug 30, 2021

Thanks for the input @PEZ . Will incorporate your feedback and update the PR.

@xfthhxk
Copy link
Contributor Author

xfthhxk commented Aug 31, 2021

@PEZ PR #1284 has been updated per your suggestions. Please have a look. Thanks!

PEZ added a commit that referenced this issue Sep 1, 2021
Fixes #1283, kill sexp forward/backward copies deletion to clipboard
@bpringe bpringe closed this as completed in 4843aff Sep 1, 2021
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

2 participants