3

I would like to be able to add the ’ character to iskeyword setting. I'm currently using this:

" Count ’ as a part of words like I’m and you’re¬
au FileType plaintex,context,tex,latex,mail,markdown,textile,text set iskeyword+=’

Unfortunately, I'm getting and invalid keyword argument for this on my version of vim. I believe I'm using the latest vim for my system:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 25 2015 19:31:37)
MacOS X (unix) version
Included patches: 1-622
Compiled by Homebrew

Should I be specifying this differently? Is it possible to add UTF8 characters to the iskeyword setting?

  • Have you tried to escape the character with '/'? – Karl Yngve Lervåg Apr 19 '15 at 17:07
2

:help 'iskeyword' points to :help 'isfname' which says:

only the characters up to 255 are specified with this option

Since (U+2019) is not part of the ASCII (0-127) or Extended ASCII (128-255) tables you can't add it or remove it from 'iskeyword'.

Which is a good thing because it is used as an apostrophe and thus can't be considered part of a word.

  • 1
    I'm accepting this as the answer, but in case anyone else stumbles into this the way I did, here's a link to the basic solution I ended up using to resolve my issue. – Aaron Massey Apr 19 '15 at 22:55

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.