-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Can't type an empty string with single or double quotes #2097
Comments
I'm pretty sure this is intended behaviour from smartparens. Otherwise, you would have a hard time inserting e.g. Python multiline strings ( |
The title "can't type an empty string with single or double quotes" is kinda misleading. Obviously, you can, and even easier than without |
You have to do |
This is a bad default. I didn't notice it because I have lispy override some smartparens pair management, but the expected result of pressing One way to reason about it is that should a person choose to close all his pairs manually (i.e. type out every closing
This is exactly the same as typing out multiline strings with no pair management, and functionally the same as:
The only difference is that currently, there is additional overhead on the user to remember that only empty strings should be treated differently, having to press Another way of thinking about this is that smartparens should offer you pair completions, which you can always confirm by actually pressing |
@TheBB That isn't any real problem, because from |
I agree it's not huge, but you don't get the auto-closing pairs.
And another way to reason is that with a pair management package installed, a person should be able to choose not to close all pairs manually. I've yet to see a solution to this problem that checks all the checkboxes. |
Hi. Today I've fixed a related issue so now the expected behaviour should be for the second quote to always move out of the pair. It was caused by a rather obscure bug I've configured around somehow and never realized it was actually a bug :/ The python issue is solved separately by adding a pair |
I've tried this both in cperl mode and in sql mode:
If I try to type an empty string, e.g.
""
or''
, I can't do it. The first"
or'
character creates a pair of quotes with the cursor inside it. But if I try to press the quote character again, it creates another pair. This only happens with empty strings. If I type, for example,"dog"
, the second quote is skipped when I press the"
key. I would expect that, if I press the"
key twice, I would get""
, instead, I get""""
.The text was updated successfully, but these errors were encountered: