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

Killing a region in strict mode breaks the code structure #230

Closed
bbatsov opened this issue Nov 12, 2013 · 4 comments
Closed

Killing a region in strict mode breaks the code structure #230

bbatsov opened this issue Nov 12, 2013 · 4 comments
Milestone

Comments

@bbatsov
Copy link
Contributor

bbatsov commented Nov 12, 2013

I think smartparens-strict-mode should override the default kill-region with some sexp-aware version of it, otherwise it becomes too easy to break your code structure accidentally. As usual - paredit can be used as a source of inspiration.

@Fuco1
Copy link
Owner

Fuco1 commented Apr 24, 2016

@expez Do you think it would be possible to port the functionality from evil-smartparens to do something like this? I think vd supports this.

@Fuco1 Fuco1 modified the milestone: Backlog Jun 14, 2016
@Fuco1
Copy link
Owner

Fuco1 commented Oct 20, 2016

Since we now have sp-region-ok-p it should be trivial to add a wrapper for kill-region (and other region-killing commands)

@Fuco1 Fuco1 modified the milestones: 1.10, Backlog Oct 20, 2016
@Fuco1 Fuco1 closed this as completed in 5c68028 Nov 5, 2016
@expez
Copy link
Collaborator

expez commented Nov 6, 2016

@Fuco1 Just reminding you that sp-region-ok-p isn't bug free. IIRC it doesn't handle prefixes correctly.

As we discussed some time ago fixing that would be a huge undertaking. In my day to day coding I never experience this as a problem, though.

@Fuco1
Copy link
Owner

Fuco1 commented Nov 6, 2016

Well, having some protection is better than none. When the problems come we'll deal with them.

If you know some example right out of the top of your head, we should throw in test cases (disabled for now) so we have a collection of tests for when we decide to fix it. Feel free to add those :)

jojojames pushed a commit to jojojames/smartparens that referenced this issue Mar 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants