35

I have a file with the character (lowercase a + combining tilde). Encoding and fileencoding are both utf-8. ga shows

<a> 97, hex 61, octal 141 <~> 771, Hex 0303, Octal 1403

(but with the actual combining tilde in the <>) and g8 shows

61 + cc 83

Searching with /a\%u0303 works fine.

Searching for just \%u0303 gives E486 Pattern not Found.

Can I search for just the combining character without also searching for the base character?

0

1 Answer 1

38

Type in normal mode /<ctr-v>u0303
/ - start search
<Ctr-v>u - init utf-8 code input
0303 - hex code combine character.

:he unicode

Also :he mbyte-combining and :he utf-8-char-arg the last one covered case with commands like f, F and so on.

1
  • 2
    Interestingly, this only works if the character is combined with something. If a file or line begins with the 0303 character, it won't be found by this method.
    – Bladt
    Commented Nov 21, 2020 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.