简体   繁体   English

emacs paredit - 如何删除引号

[英]emacs paredit - how to delete quotes

I'm using the emacs starter kit, https://github.com/technomancy/emacs-starter-kit , which comes with paredit mode. 我正在使用emacs入门套件, https://github.com/technomancy/emacs-starter-kit ,它带有paredit模式。 I'm writing some javascript, and would like to remove something from quotes. 我正在写一些javascript,并想从引号中删除一些内容。 Eg. 例如。 "somestring" should become somestring "somestring"应该成为一些somestring

What the best way to do that? 最好的方法是什么? Going in the other direction is easy, I just select somestring and type a quote. 走另一个方向很容易,我只选择一些somestring并输入引号。

Thanks. 谢谢。

Use Ms to splice the current form into the outer form. 使用Ms将当前表单拼接到外部表单中。 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 Ms. 是按女士时光标的位置

If you're on the first quote, you can Mx delete-pair . 如果你在第一个引用,你可以Mx删除对 If you do it all the time, bind that to some convenient key. 如果你一直这样做,将它绑定到一些方便的键。

将点放在字符串的任何位置并键入MsMx paredit-splice-sexp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM