-
Notifications
You must be signed in to change notification settings - Fork 621
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
Bold inside a word (or sentence in this case). #640
Comments
I suspect this might cause problems with having to double-escape the sequence @EinfachToll @Nudin @ranebrown , Do you want to weigh in on this? |
@hq6 I'm not convinced that there's not an more elegant way to solve that. I'd hope for a better solution with an improved regexp that doesn't depend explicitly on spaces. |
Something like |
I agree, this shouldn't be an option but rather an improvement to the existing syntax definition / regex patterns. From what I have found the commonly accepted way to handle this is to only allow asterisks and not underscores for intraword emphasis. (CommonMark Spec, Meta StackExchange). E.g. |
@ranebrown I think your suggestion makes sense, although I think a backwards-incompatible change might justify a version jump by itself, possible paired with other backwards-incompatible changes. @Nudin, I'm not sure I understand your suggestion. Are you suggesting that we should try to discover word boundaries in a more general-purpose way and still use |
Yes. |
@Nudin disclaimer that needs to be done is that I'm not a native speaker, I'm just studying it and trying to use vimwiki to make a notes. So most of my japanese text are short (one or few sentences) and therefore usage by native speaker could be way different. That out of way, I use normal word movements ( This works (I think) thanks to the fact that japanese is composed of 3 alphabets all used at once, and vim seems to make words on boundries where the alphabets change. How it works in chinese for example (which has only one alphabet afaik) I have no idea (it probably does not really work in useable way). As for the improving automatic detection of word boundries, this quora question https://www.quora.com/What-are-some-Japanese-tokenizers-or-tokenization-strategies , especially answer from Graham Neubig is pretty interesting. So while it's possible to do somewhat reliably (I read somewhere around 95% accuracy for the TinySegmenter), it's probably not a small feet to implement it. And imho you would also need a way to flag parts of file as some language, since if file is mix of English and Japanese (as are mine) you would need different word-splitting method for each language applied correctly. |
I do not have a strong opinion on whether it makes more sense to change what the syntax means inside words vs trying to find word boundaries in a different way. The disadvantage of the former is that we're breaking backwards compatibility, while the disadvantage of the latter if that it might be trickier to implement correctly. The advantage of the former is that it might generalize more easily to other use cases. If there are more native speakers of languages that do not use spaces to break words (who use vimwiki), perhaps they could weigh in on this issue? |
Here is a patch I'm using in the mean time https://github.com/graywolf/vimwiki/commits/enforceable_typefaces , seems to work well. |
Hi, one question on this topic: what would be the problem with using |
…iki#847, vimwiki#640) - Less code, Easyer to maintain, to add a markup language - Faster to load, and to highlight - Support multiline tags: vimwiki#847 - Support nested tags - Support intraword tags: this<b>bold</b>type vimwiki#640
…iki#847, vimwiki#640) - Less code, Easyer to maintain, to add a markup language - Faster to load, and to highlight - Support multiline tags: vimwiki#847 - Support nested tags - Support intraword tags: this<b>bold</b>type vimwiki#640
…iki#847, vimwiki#640) - Less code, Easyer to maintain, to add a markup language - Faster to load, and to highlight - Support multiline tags: vimwiki#847 - Support nested tags - Support intraword tags: this<b>bold</b>type vimwiki#640
…iki#847, vimwiki#640) - Less code, Easyer to maintain, to add a markup language - Faster to load, and to highlight - Support multiline tags: vimwiki#847 - Support nested tags - Support intraword tags: this<b>bold</b>type vimwiki#640
Currently it's not possible to make bold just part of the word (as already mentioned #545). That works reasonably well for english texts, however it does not really play nice with languages that do not use spaces to separate words.
I don't know much about vim programming, but if I figure out how to add alternative sequence to make bold, something that is reasonably improbable to appear in normal text (for example
!*
), would that be consider for merge or is this something this project will not accepts?Basically I would be able to do
!*どれ!*ですか。
to make theどれ
part bold without need to surround it with spaces.The text was updated successfully, but these errors were encountered: