防止paredit在插入括号时插入空格-以及其他问题 [英] Prevent paredit from inserting a space when inserting parentheses - and other issues

查看:73
本文介绍了防止paredit在插入括号时插入空格-以及其他问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢paredit。但是我讨厌一些事情,并且还没有解决它们:

I love paredit. But there are a couple of things I hate, and have not yet come around to fixing them:


  • 打开括号会插入空格在括号前。我了解这可能是整个互联网的首选样式,但这不是我的。如何避免这种情况?

  • 在带引号的区域(')内,我无法回删除。另外,键入双引号( )将插入反斜杠(显然是为了避免双引号-只是不需要,至少在python中如此。因此,我不需要想要反斜杠。如何配置呢?

  • 实际上, paredit 尝试(但失败)在退格方面非常明智。无论我是否在未完成的报价区域中,都应始终删除前一个字符(如果引号不匹配,paredit只会拒绝执行任何操作。请尝试在此处删除: helloo )。唯一有意义的删除操作是在该点正好在左括号之前。

  • Opening a parenthesis inserts a space before the parenthesis. I understand this is probably the preferred style of the whole internet, but it is not mine. How can avoid this?
  • When inside a quoted area (''), I am not able to back-delete. Also, typing a double quote (") will insert a backslash (obviously to escape the double quote - only that this is not needed, at least in python. So I do not want the backslash. How to configure this?
  • Actually, paredit tries (and fails) to be very wise relating backspace. My backspace should always delete the previous character, no matter whether I am in an unfinished quoting area (paredit just refuses to do anything if the quotes do not match. Try to delete here: "helloo). The only situation where a delete makes sense to be treated specially is when the point is just before an opening parenthesis.

推荐答案

这不是答案,但是评论太久了……

This is not an answer, but too long for a comment...

Paredit适用于以前没有空格的语言一个会很可怕,而那些没有python的 quote-cleverness的人。您可能会因为这些问题而将其破解,但是syn python的税率足够不同,以致于无法正常工作。

Paredit is intended for languages where not having a space before a ( would be horrible, and ones that do not have python's "quote-cleverness". You could probably hack it for these issues, but the syntax of python is sufficiently different that making it work there would be a non-trivial project.

最后一点,听起来好像您不想在这里进行paredit所有,因为这是非常有意的尝试,以保持您的原谅&报价均衡,所以也许它不是适合您的工具。 IOW,您可能更喜欢自动配对电对或其他类似工具。

As for your last point, that sounds like you don't want paredit at all, since it's very intentionally trying to keep your parens & quotations balanced, so maybe it's not the right tool for you. IOW, you might prefer auto pairs or electric pair or a bunch of other similar tools.

这篇关于防止paredit在插入括号时插入空格-以及其他问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆