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

Entering a bracket-character should surround the currently selected text #719

Closed
sanderboom opened this Issue Sep 18, 2017 · 17 comments

Comments

Projects
None yet
4 participants
@sanderboom
Contributor

sanderboom commented Sep 18, 2017

Expected behaviour

surround

Actual behaviour

surround-no

sanderboom added a commit to sanderboom/qmarkdowntextedit that referenced this issue Sep 18, 2017

@pbek pbek added the enhancement label Sep 18, 2017

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2017

Thank you for your suggestion. Why do you think that should work that way? Is there any other editor that does this this way?

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Sep 18, 2017

All that I know :)

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2017

Kate, Brackets and the JetBrains toolchain didn't do it that way...

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Sep 18, 2017

Kate, Brackets and the JetBrains toolchain didn't do it that way...

That's interesting, for me JetBrains/Kate/ST/Atom all do this...

@bepolymathe

This comment has been minimized.

bepolymathe commented Sep 18, 2017

From my perspective, that would be an interesting development.

@bepolymathe

This comment has been minimized.

bepolymathe commented Sep 18, 2017

As I recall, some latex editors (texstudio for example) work like this.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2017

I guess it would be a nice addition, but the user should be able to turn in off in the settings in QOwnNotes...
(otherwise we possibly will get issues reported)

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2017

@sanderboom, I saw you did you code addition inside a method that uses AutoTextOption::BracketClosing, I guess we can omit using an other setting.

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Sep 18, 2017

@pbek I agree. Maybe if users are really frustrated and want to have autobracketclosing but don't want to have their selected text surrounded with brackets, a new setting would be welcome :)

BTW is this setting default enabled or disabled?

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2017

It's enabled.

if (settings.value("Editor/autoBracketClosing", true).toBool()) {

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Sep 18, 2017

It's enabled.

Ah, nice! Then I'm even more in favor of keeping it as it is :)

@pbek pbek added this to the 17.09.5 milestone Sep 18, 2017

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2017

17.09.5

  • added support for entering a bracket-character that surrounds the currently
    selected text (for Issue #719, thank you @sanderboom)
@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Sep 18, 2017

Yay! Thanks.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2017

There now is a new release, could you please test it and report if it works for you?

@Maboroshy

This comment has been minimized.

Contributor

Maboroshy commented Sep 18, 2017

Works for me. Nice feature.

@Maboroshy

This comment has been minimized.

Contributor

Maboroshy commented Sep 18, 2017

If I'd put more time into QCursor exposure that could be done with a script.
Next is making a markdown link by selecting text and pressing [ and (.
Like selecting link + [, ( = [](link)... Or maybe [link]()... I don't know yet.

@pbek

This comment has been minimized.

Owner

pbek commented Sep 18, 2017

Great, thank you for testing!

@pbek pbek closed this Sep 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment