Page 1 of 1

Customizable tag separator character. Is it possible?

Posted: Sun Jan 08, 2017 5:22 pm
by Ovg
Hi Alex!
Is it possible to make tag separator character customizable? Currently it is space character. I often use multi-word tags and I'm forced to use some other delimiter - eg nbsp (non breakable space character (\u00A0 or Alt+0160)) . It is bit inconveniently for me to press Alt and 0,1,6,0 keys a few time while adding a tag.

WBR, Oleg

Re: Customizable tag separator character. Is it possible?

Posted: Tue Jan 10, 2017 11:23 am
by CintaNotes Developer
Hi Oleg,

If what you want is not a different separator, but multi-word tag support,
then this is already planned. It might be implemented differently however,
e.g. keep space as separator but require using quotes for multi-word tags like this:

tag1 tag2 "multi word tag"

Did you vote here:
http://roadmap.cintanotes.com/topics/13 ... word-tags/

Re: Customizable tag separator character. Is it possible?

Posted: Tue Jan 10, 2017 12:29 pm
by Ovg
Hi Alex!

Thank you for reply and links! I've voted.
As workaround I've wrote AHK script to insert nbsp upon pressing Alt+Space.

WBR, Oleg

Re: Customizable tag separator character. Is it possible?

Posted: Tue Jan 10, 2017 3:49 pm
by CintaNotes Developer
Wow, this is great. Maybe you could share the script here, for those who wouldn't want to wait?

Re: Customizable tag separator character. Is it possible?

Posted: Tue Jan 10, 2017 5:52 pm
by Ovg
Hi Alex!
AHK script to insert nbsp upon pressing Alt+Space and compiled versions (x32/x64) is attached to my post.

WBR, Oleg

Re: Customizable tag separator character. Is it possible?

Posted: Tue Jan 10, 2017 8:12 pm
by date
Why not make it like Alt-Space :) Instead of "multiple word tag" .
And to make it clear the spaces are within the tag, in the tag field, replace them with a middle dot, like multiple·word·tag. But in the tag list, display it as multiple word tag. And in the XML within " or with · as well.

Re: Customizable tag separator character. Is it possible?

Posted: Thu Jan 12, 2017 2:25 pm
by CintaNotes Developer
Oleg, thanks for sharing the script, and special thanks for adding the binaries!

date, that's an interesting suggestion, although a bit uncommon one. Don't know of any software that works this way.
Probably the most straightforward way would be to still allow using the comma for separating tags in all fields that accept multiple tags. Many people are used to it already. The problem is, some fields accept mix input: the search field accepts tags and search phrase. When you press Enter tags are applied to the sidebar, and the search phrase remains. Here commas won't help. But we can take advantage of the fact that search field can't create new tags. So the longest possible match should be taken.

Re: Customizable tag separator character. Is it possible?

Posted: Thu Jan 12, 2017 4:35 pm
by date
Then how will you know if the space is within a tag? For example, if I enter these tags:
comma seperating "tags sidebar "search phrase "enter "tags/cinta notes"
and make everything inside two nearest quotes of which the last one is followed by a space, a space within a tag, what tags do I end up with?

I think the best solution, regardless of what seperator you use or how you want to make spaces happen within tags, is to draw a rectangle around every tag as soon as it is typed (like Simplenote does, but with colors), and break the rectangle when the cursor is on the tag.
If you make it like this, it doesn't matter if you require quotes or make it alt-space, because then it is clear what you end up with.

Because you are making a new UI, I think now is a good time to think about it. :)

Re: Customizable tag separator character. Is it possible?

Posted: Mon Jan 16, 2017 4:32 pm
by CintaNotes Developer
date wrote:Then how will you know if the space is within a tag? For example, if I enter these tags:
comma seperating "tags sidebar "search phrase "enter "tags/cinta notes"
and make everything inside two nearest quotes of which the last one is followed by a space, a space within a tag, what tags do I end up with?


One possible algorithm could be: parse from left to right looking for double quotes. Trim leading and trailing spaces from quoted parts. If number of double quotes is uneven, ignore the last one. Then split the rest by space. So your example will yield following tags:
comma
seperating
tags sidebar
search
phrase
enter
tags/cinta
notes

I think the best solution, regardless of what seperator you use or how you want to make spaces happen within tags, is to draw a rectangle around every tag as soon as it is typed (like Simplenote does, but with colors), and break the rectangle when the cursor is on the tag.
If you make it like this, it doesn't matter if you require quotes or make it alt-space, because then it is clear what you end up with.

But how do you know that the tag typing is finished? Especially if I want to add a space to the tag name? We'll have introduce a "tag separator" key.. wait.. it's that where we started?

Because you are making a new UI, I think now is a good time to think about it. :)

Agreed.

Re: Customizable tag separator character. Is it possible?

Posted: Mon Jan 16, 2017 7:01 pm
by date
CintaNotes Developer wrote:One possible algorithm could be: parse from left to right looking for double quotes.
So essentially, first isolating the parts in double quotes, and doing the space-seperated tags later. You can do it multiple ways, but it is better to be able to distinguish what tags you will end up before you save and close the note, so you can correct them if needed.

is to draw a rectangle around every tag as soon as it is typed

But how do you know that the tag typing is finished? Especially if I want to add a space to the tag name? We'll have introduce a "tag separator" key.. wait.. it's that where we started?

You know when the cursor is one space away from the tag, except when there is an unclosed double quote. I noticed when trying the fake space, it is difficult to distinguish which parts belong to one tag. (So I'll continue to use '-' like I did before. It's only in about 5% of my tags.)
A 'customizable' tag seperator will solve this, but that means you can't separate tags with a space anymore. So then the choice is, have spaces in your tags, or separate the tags with spaces, but not these two at the same time.

I think using double quotes or alt-space is the best of both worlds, if the visibility problem is solved.
Because you are making a new UI, I think now is a good time to think about it. :)

Agreed.

I would like it! But if I had to choose between having spaces in tags, or being forced to type a comma, I would still prefer the space separator, and do without spaces in tags. (I think...)

(And what about Simplenote compatibility. Send a fake space there? At least Simplenote's visual feedback is good enough.)

Re: Customizable tag separator character. Is it possible?

Posted: Thu Jan 19, 2017 9:03 am
by CintaNotes Developer
Yes, I like the space + double quotes for multi-word tags more as well.
About Simplenote compatibility, will need to check. But I'm sure there will be workarounds possible in any case.