2015-11-16 22:29 GMT+03:00 Brian Wilson <bount...@gmail.com>: > On Saturday, November 14, 2015 at 9:02:24 PM UTC-8, ZyX wrote: > > `gq` behaviour is by a &formatexpr and &formatprg option values and > you may use them if you know a program which serves your purposes. `w` and > other motions can be remapped, same for `J` (in the last case you may > manually choose between `J` (join with spaces) and `gJ` (join without > inserting spaces, but also without removing them)). So you can have some > minor level of convenience by configuring Vim without patching it. But this > does not work for > > > > > > 1. Motions inside “nore” mappings. > > 2. expand('<cword>') and other means of getting word under the cursor > (e.g. :edit <cword>). > > 3. Behaviour when &linebreak option is set. > > 4. `\<`/`\>`. Though I am unsure that this should be fixed: I always > parsed this as “place between non-word and word character” and “place > between word and non-word character”, and not “place where word starts” and > “place where word ends”. Documentation says about the second > interpretation, but I have a strong impression (based on wording, actual > implementation and the fact that this is my interpretation) that author > meant the first variant. > > > > > > Thank you ZyX, > Learning the difference between J and gJ is very helpful > > Regarding remapping of w, I do not know how to remap it such that it would > move to the next Thai word. >
You will have to implement needed algorythm in VimL. If you know how to determine thai word boundaries using ICU you may take Python ICU bindings, Vim with +python[3] and implement the needed motion in “VimL” where most job is done by python and ICU, and VimL is only used to run Python. In any case I think that writing this in Python will be much easier even without ICU: Python at least has unicodedata module built in, and Vim has nothing like this. > > 4. Perhaps an example will clarify the technical description of what I > mean since I am not sure of the difference between the two examples that > you give. :) If I type '*' while sitting on a Thai word, I would expect it > to go the next matching word and not try to match the entire > unspaced-phrase. 'diw' should not delete the entire phrase, but only the > Thai word that I am sitting on. etc. > Most likely the only option here will be remapping `*` and `#`: I predict that behaviour of `\<`/`\>` will not be changed. Though if somebody implements changes for `[ai]?w|[eb]` motions it may be possible that `*` will also produce different regex out of the box. > > Brian > > > -- > > > > You received this message from the "vim_dev" maillist. > > > > Do not top-post! Type your reply below the text you are replying to. > > > > For more information, visit http://www.vim.org/maillist.php > > > > > > > > --- > > > > You received this message because you are subscribed to the Google > Groups "vim_dev" group. > > > > To unsubscribe from this group and stop receiving emails from it, send > an email to vim_dev+u...@googlegroups.com. > > > > For more options, visit https://groups.google.com/d/optout. > > -- > -- > You received this message from the "vim_dev" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_dev+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.