emacs-evil/evil-cleverparens

Support C-w and DEL

Closed this issue · 5 comments

I think it would be a good idea to have a safe equivalent of evil-delete-backward-word, evil-delete-backward-char, etc. One technique would be to do nothing, but there is also the route that lispy takes, which is to delete the entire sexp when deleting at (| or |). I think the latter makes the most sense.

Hmm yeah I agree. I think evil-delete-backward-word should behave as you mentioned, but I'm undecided on if X should act like x i.e. evil-cp-delete-char-or-splice or if it should just skip the delimiters. On one hand it feels like x and X should do the same thing, but on the other hand I can't really see myself using X to splice, so I'll have to give it some more thought.

In the case of C-w it should only delete the entire form if the cursor is before an opening delimiter of course.

I never really use X; I usually use backspace/DEL for the same functionality (though it's actually evil-delete-backward-char-and-join by default I think). I'm not sure that splicing with X would make so much sense either. I think it might make more sense to just have it act like DEL/C-w when after a paren. Skipping the delimeters like sp-backward-kill-word does might be nice to have as an option, but usually deleting the whole sexp is what I find I want instead of skipping.

The issue of DEL is handled by smartparens-strict-mode for me. I don't enable it by default with evil-cleverparens as I think people should be able to choose between that and paredit, but I do mention it in the README.

That makes sense. Thanks, I think that fixes this issue.