Open aeberts opened 1 year ago
Hi! Thanks for this issue. I don't quite understand what's supposed to happen. Can you describe it with a few before/after examples, something like:
before 1:
(a b c (d e)| f)
after 1:
what-it-should-look-like-after-1
...
The vertical bar |
denotes the cursor.
Hi @PEZ many thanks for your great work on Calva!
re: paredit-backward-kill-word here's the before and after:
Before:
(paredit-kill-word kills by word but (preserves) parentheses|)
After executing paredit-backward-kill-word
1 time:
(paredit-kill-word kills by word but (preserves) |)
After executing paredit-backward-kill-word
2 times:
(paredit-kill-word kills by word but (|))
After executing paredit-backward-kill-word
3 times:
(paredit-kill-word kills by word |())
Here's an animated gif which shows both deleting backward by character and then by word:
Source: http://danmidwood.com/content/2014/11/21/animated-paredit.html
Hope that is clearer!
Note: Edited to correct the examples.
Thanks. Looks funny with the word ”parentheses” reappearing after the second use of the command. Is that a typo?
Yup, good catch - that's a copy and paste error. I'll correct it.
As an Emacs user, I am accustomed to using the "paredit-backwards-kill-word" function to delete words backwards while preserving parentheses. This function doesn't appear to be available in Calva (unless I'm missing something?).
My VSCode-fu is not up to the task of porting the Emacs code to VSCode but I've included the Emacs implementation below for reference.
Many thanks!
http://paredit.org/releases/26/paredit.el