Open andis-sprinkis opened 1 year ago
Do you have certain key combinations in mind? -- for a dash, --- for a hyphen?
Something similar, but I didn't have one specific in mind, this was a momentary idea which I should thought through more before posting, sorry about that.
Now I have laid out all the similar looking characters I use or would consider using, so:
U+002D Hyphen-Minus
is on the respective key on most keyboard layouts. As the mathematical minus sign and symbol in programming notation.Below mentioned characters I'd consider common, at least for my own use in code docs and design work. I'm more or less guided by what Wikipedia says about their usage.
For proper-looking text formatting, separating words in sentence structure, I replace the lazy U+002D Hyphen-Minus
with either
U+2014 Em Dash
U+2013 En Dash
U+2014 Em Dash
, so I tend to use it more often now.Composite word separator
U+2010 Hyphen
Ensuring a composite word won't break
U+2011 Non-Breaking Hyphen
For stylistic purposes I'd use one of these, in websites for things like large headings or as empasis or separators for navigation elements, or marking quotes.
U+2015 Horizontal Bar
U+2E3A Two-Em Dash
U+2E3B Three-Em Dash
This below one turns out is supposed to be used for numerical ranges e.g. 100‒200, but so is U+2013 En Dash
, so I prefer that instead.
U+2012 Figure Dash
These are the ones I'd like be able to swap between in some convenient way.
But there are so many, that except for 2 or 3 most used ones, autocompletion source or a fuzzy finder for Unicode characters (internal in nvim, like with Telescope or fzf-lua) or external (e.g. with fzf, dmenu) may be a better fit.
I often swap both dash and quote-like characters, so your plugin looked very promising approach for it and for quotes it is.
What also is limiting for dash-like character that on keyboard there is only 1 key that covers these characters, while for quotes there are at least 2.
However, LateX and groff/troff typesetting systems both have short char. sequences for these characters, so maybe it's worth taking some inspiration from them.
I'm gonna need more specific details.
All what I can think of is turning --
into some kind of a dash, then adding another -
to it turns into another unicode dash. If this is what you want, tell me which specific unicodes you want. Or if you have other ideas about how it should work. I think compose key on Linux does this.
<Compose Key>--.
–
<Compose Key>---
—
Where -
is the minus sign key on the keyboard.
More of a vague momentary idea (just close if nothing comes out of it :smile:) . Various hyphens, dashes and minus signs are also characters that look similar yet different to each other and have different use cases.
https://en.wikipedia.org/wiki/Dash https://en.wikipedia.org/wiki/Hyphen
When trying to get text formatting right, I find myself copypasting these from the browser. I think it would be convenient to be able to insert specific ones with simple keystrokes, similarly how different 'quotes' are inserted with this plugin.
Do you think it would make sense to make a similar mode or plugin for cycling between these?