Hello,
I've recently started using QOwnNotes (though not with OwnCloud), and there's something that I'm missing:
If I type "(", I expect it to automatically close the bracket and place the cursor in the middle, like so "(|)". The same is true for different brackets, quotation marks and start thingies "*".
Is this something that you'd be interested in adding to QOwnNotes?
Thank you for your suggestion, I will look into it.
", ', *, (, [ or { are automatically closed", ' and * are only closed if there isn't already an openingThere now is a new release, could you please test it and report if the new features work for you?
Is the new release already available in the PPA?
I already saw it is. Thank you for adding this!
I suggest doing the same for deletion, that is, when deleting one bracket, automatically delete the other, if nothing is typed inside the bracket. For example, type "(", it'll automatically pair with "(|)". Now if I delete "(", it should automatically delete its pair, ")".
One off-topic question: Where does qownnotes store its config file, under Ubuntu?
I will see about the deleting of brackets...
You'll find the configuration in ~/.config/PBE/QOwnNotes.conf
I see that this is a useful feature for some, but others (like me) don't want their editor to add characters they didn't type.
Is it possible to make this behaviour optional?
(And maybe also the older feature which automatically begins the line with an enumeration symbol if the line above had one.)
No one has complained yet... ;)
Now there was a complain. :smile_cat:
Yep, how to turn this feature off?
QOwnNotes clean unassuming interface - for me - is it's charm. Have you any idea how hard it is to find a decent, no frills text editor? VERY hard. Your project is perfect in so many ways! Clean UI. Syncs seamlessly to owncloud. built in md with preview. Nice files list with overview and folder-view. Loads in seconds. Crashes sometimes when it saves (on mac), but restarts in a flash without any data loss.
Also, you are auto-inserting stuff, but if I delete the initial ' or * the auto-inserted char stays there! That's double annoying.
If you haven't guessed already, I really love your project.
Thank you for your kind words, @shaununderwood
Yep, how to turn this feature off?
I'm working on that, I guess I will turn it off by default.
Crashes sometimes when it saves (on mac), but restarts in a flash without any data loss.
Can you please open an issue with a crash report. In the settings you'll find Debug options, can you please turn file logging on and also post the lines before the crash.
I see that this is a useful feature for some, but others (like me) don't want their editor to add characters they didn't type.
I agree that this feature should be opt-out (or even opt-in), but I almost never use unpaired-brackets. In fact, I don't remember ever using it. If I did, it was a mistake. I reckon most people would welcome this feature. But of course, there are always exceptions to the rule..
Also, you are auto-inserting stuff, but if I delete the initial ' or * the auto-inserted char stays there! That's double annoying.
As far as I'm aware, @pbek is considering adding the delete-in-pairs function.
@mimf
... but I almost never use unpaired-brackets. In fact, I don't remember ever using it. If I did, it was a mistake. I reckon most people would welcome this feature. But of course, there are always exceptions to the rule..
The bracketing I can see the logic behind your bracketing suggestion - I'll keep that in mind going forward - however, * are used for lists, ' are used for abbreviations ( eg aren't they? :)
I agree that this feature should be opt-out (or even opt-in)
as an existing user opt-in would be my expectation, but as long as we've an option (perhaps for each pairing?) that'd be great.
however, * are used for lists,
QOwnNotes favors -, * is also used for italic and bold, so "closing" them might make sense
hard decision... maybe no auto-closing at the start of a line?
' are used for abbreviations
never saw that, which markdown syntax is that?
as an existing user opt-in would be my expectation
I guess 99% of the people wouldn't search for a setting to turn it on, default is king.
I currently tend to make it opt-out...
As far as I'm aware is considering adding the delete-in-pairs function.
I'll try to, but it's more hard and dangerous to determine how and when to delete what character... (plus there a several ways for a user to delete characters)
however, * are used for lists,
QOwnNotes favors -
Okay, I'll keep that in mind. I guess you can interpret your md as you wish. http://bit.ly/2fVpWu6 has single *s as bullet lists.
' are used for abbreviations
never saw that, which markdown syntax is that?
None, it's English grammar: can't, wouldn't, that'll, it's, one's, they'll, 10's of thousands. 'owdy part'er. 'ou'll know me by now.
That's just for abbreviations and possession. Apostrophes, they're a pretty important grammatical tool. :)
Okay, I'll keep that in mind. I guess you can interpret your md as you wish. http://bit.ly/2fVpWu6 has single *s as bullet lists.
Yes, of course they are used. I'll think of something.
None, it's English grammar
How could I forget about that. :D
I will remove ', thank you.
QOwnNotes favors -
Actually that's not even true, I also handled * as list character.
Editor settings< and removed closing of '* will now only be closed if not used in listsThere now is a new release, could you please test it and report if the new features work for you?
The apostrophe is working as expected.
The * also works as before :)
Great Thanks!
Great, thank you for testing!
I think I will disable the automatic closing of characters if not entered at the end of a text block... It's pretty annoying if you want to enter a bracket in front of an existing text and you get the closing too. And it will even be kind of destructive when I add the automatic bracket removal feature.
Any thoughts on that?
I agree with that. I suggest taking a look at SublimeText.com or atom.io (or even the bracket pairing extension for Vim). They all follow the same standards.
@mimf like this? https://github.com/jiangmiao/auto-pairs
(, [, {, <, * or "Editor settingsThere now is a new release, could you please test it and report if the new features work for you?
@pbek, from the testing I did, it works fantastically.
That's some fast release. This feature was requested just 3 days ago, and it's already here. Thank you for the hard work.
Thank you. And it was not the only thing I worked on. ;)
The pairing of * is not working here. I'm not on a list, yet it's not pairing. Is this expected behaviour?
@mimf, can you please be more specific on what you did, what happened and what you expected.
Of course, my bad:
Just type * and that's all I got. I expected *|*. However, If I type 3 times *, It will eventually autopair 1 of them, and I'll end up with ***|*. I expected **|**.
Well, I just found out that behavior I mentioned only happens at the start of a line.. I suppose this is expected. My bad, sorry!
Well, I just found out that behavior I mentioned only happens at the start of a line.. I suppose this is expected.
exactly ;)
Well, if one is not at the start of a line and one types **, shouldn't it pair to **|**?
We don't do pairing if we are not at the end of the line, too dangerous.
But it pairs the first *, just not the second..
Can you please explain in more detail and step by step what you did, what happened and what you expected.
My bad again.
Type something and then hit *. You'll see that it pairs and becomes *|*. Now, since it paired, you expect the same to happen if you type * again, but that doesn't happen. What you get is **|* and what I'd expect is **|**. "|" represents the cursor.
Like I said we do auto-adding and removing only at the end of a line. Everything else can prove to be dangerous.
Well, yes, but we're at the end of a line.. Other than the *, that is. I don't think the behaviour is consistent. It pairs the first *, but not the second. It's hard to make something bold that way. But well, it seems you're aware of it.
No character is paired when it's not entered at the end of the line. The 2nd time you enter a * it's not at the end of the line.
You can also create all * characters by typing Ctrl + B.
But I now did this, we'll see if this is misbehaving:
* characters in a row and closing both of them when the first * was at the end of the lineThere now is a new release, could you please test it and report if the new features work for you?
Damn, this is some nice priority support! Yes, the * works fine.
However now one could argue that the same should apply to all the characters, such as ( {[ " '....
Why is it dangerous adding such characters at the end of a line?
if you scroll a bit up...
I think I will disable the automatic closing of characters if not entered at the end of a text block... It's pretty annoying if you want to enter a bracket in front of an existing text and you get the closing too. And it will even be kind of destructive when I add the automatic bracket removal feature.
馃樃
Yes, you're right. But you should take into account when the following character is also a bracket (or similar). Just like sublime/atom and the likes do (and you/qownnotes also, with the * character).
Also, an additional feature. If we've "blabla" and select that text, wouldn't it be cool if by entering "(" it would make it "(blabla)" instead of deleting blabla and exchanging it with "()"? :smile:
additional feature
that could be nice for some or drive others crazy, who expect the text to be removed :)
Also, an additional feature. If we've "blabla" and select that text, wouldn't it be cool if by entering "(" it would make it "(blabla)" instead of deleting blabla and exchanging it with "()"?
I agree with @pbek here, I think the best for this would be shortcuts, e.g.: press Ctrl+Shift+( to enclose the selected text in parentheses, and so on for other special characters.