I am finding myself using the point d'irony (⸮) more and more. However, vim spelling does not recognise it as a valid punctuation character.

How can I add it to vim so that the spelling works?

  • According to the vim documentation, you need to regenerate/modify the spelling dictionaries of vim to change the "word characters". – jofel Sep 2 '14 at 13:17

One way to solve this problem is to add the character directly to vim as a defined punctuation mark. The way you do this is modify the vim source file, mbyte.c, and then recompile vim. This file is located in the main /src trunk (see https://code.google.com/p/vim/source/browse/src/mbyte.c). The function you want to modify starts like this:

* Get class of a Unicode character.
* 0: white space
* 1: punctuation
* 2 or bigger: some class of word character.
int c;
   /* sorted list of non-overlapping intervals */
   static struct clinterval
      unsigned int first;
      unsigned int last;
      unsigned int class;
   } classes[] =
         {0x037e, 0x037e, 1}, /* Greek question mark */
         {0x0387, 0x0387, 1}, /* Greek ano teleia */
         {0x055a, 0x055f, 1}, /* Armenian punctuation */
         {0x0589, 0x0589, 1}, /* Armenian full stop */
         ... etc and so on

You add your character to this list and it will be treated as punctuation after you recompile.

  • 2
    in which case you probably should report a feature request to vim with the proposed code-change, as otherwise your change will not survive the next upgrade... – umläute Sep 11 '14 at 8:33
  • This provided the information for me to open a bug so that the fix was trivial. Thank you. – Sardathrion - against SE abuse Sep 15 '14 at 12:53

As umläute suggested in a comment, to Tyler Durden's answer, I opened a feature request/bug report issue 258 in vim. The fix is in patch 7.4.444.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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