Alex Rivera | Logout

emacs paredit - how to delete quotes

Asked 2011-04-04T18:36:00.350
15

I'm using the emacs starter kit, https://github.com/technomancy/emacs-starter-kit, which comes with paredit mode. I'm writing some javascript, and would like to remove something from quotes. Eg. "somestring" should become somestring

What the best way to do that? Going in the other direction is easy, I just select somestring and type a quote.

Thanks.

Edit
Report

1 Answer

22

Use M-s to splice the current form into the outer form. This works with quotes, parentheses, and similar stuff, depending on the exact mode you're in:

(bla (|foo))  -> (bla |foo)
(bla "|foo")  -> (bla |foo)

Where | is the position of the cursor when you press M-s.

answered 2011-04-04T19:16:52.587

Your Answer