Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.editors    |    What? Edlin ain't good enough for you?    |    123,932 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 123,314 of 123,932    |
|    Janis Papanagnou to Janis Papanagnou    |
|    Re: [vim] Jumping from current Unicode s    |
|    28 Dec 23 05:14:16    |
   
   From: janis_papanagnou+ng@hotmail.com   
      
   On 28.12.2023 02:52, Janis Papanagnou wrote:   
   > In Vim I frequently jump from string to the next equal string using the   
   > commands '*' (forward search'n'jump) and '#' (backward search'n'jump).   
   >   
   > With Unicode characters that doesn't seem to always work (at least not   
   > per default).   
   >   
   > In the following (UTF-8 encoded) test sample there is one subset of   
   > Omega words where * and # works correctly and one where it doesn't   
   > (starting with the cursor on the first letter of any word)   
   >   
   > Ωmega Ωmega Ωmega Ωmega Ωmega Ωmega Ωmega Ωmega   
   >   
   > The difference is only the encoding of the first character of that   
   > word ('\x03A9' versus '\x2126'). For words with Ω=\x03A9 it works but   
   > not for words with Ω=\x2126.   
   >   
   > Is there a way to fix or achieve that function for all UTF-8 encoded   
   > words?   
      
   I noticed that the effect is not depending on Unicode characters but   
   behaves similar to this ASCII-only test-case   
      
    'help' 'help' 'help'   
      
   If the cursor starts at the first quote we see the same effect   
      
    'help' 'help' 'help'   
    ^ ^ ^ first turn   
    ^ ^ ^ second turn   
      
   The quote seems to be excluded from consideration of the * command,   
   and the cursor jumps to the next word part. - Can this be explained?   
      
   So one of the Unicode characters mentioned above is not considered   
   part of the word while the other one is. And only words seem to be   
   considered, at least in this case.   
      
   But on the other hand, I can navigate with * also within non-alpha   
   characters like   
      
    §%" §%" §%" §%"   
    ^ ^ ^ ^   
      
   So this also works.   
      
   I'm not pleased by that behavior. Looks also inconsistent to me.   
      
   Janis   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca