Monday, November 23, 2015

Re: Go to Japanese character

bob beckett wrote:
> On Thursday, November 19, 2015 at 1:38:00 PM UTC-8, bob beckett wrote:
>> I have created a Japanese-English vocabulary list for my personal use.
>>
>> Oftentimes I want to go to the first non-ASCII character in a line.
>>
>> Can anyone suggest a way to accomplish this? Maybe a remapping?
>>
>> Thanks
> Sorry it took so long to reply.
>
> Thank you for your suggestion. Unfortunately, it finds all non-ASCII characters in the entire file, and it does not move the cursor to the first Japanese (i.e. non-ASCII) character in the current line.
>
> What I envisioned was some kind of modification of the f(ind) command. But I can't figure it out.
>
Modify Bob's suggestion: /^[^ -~] (ie. line beginning with non-ascii)

Or, if you're using utf-8:

/^[\u30A0-\u319f] for katakana
/^[\u3040-\u309f] for hiragana
[^[\u3040-\u319f] for either katakana or hiragana (since they're
right next to one another in the utf-8 glyph table)

Regards,
Chip Campbell

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: