3

I noticed this fact trying to use Yggdroot/indentLine plugin, which requires conceal feature.

$ /usr/bin/vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 29 2017 18:37:46)
Included patches: 1-503, 505-680, 682-1283
Compiled by root@apple.com
Normal version without GUI.  Features included (+) or not (-):
...
-conceal         +libcall         -profile         +visualextra
...

Vim > 7.3 usually supports +conceal feature.

Does anybody know why apple explicitly excluded conceal feature when compile?

Thanks in advance.

Akko Yukky
  • 41
  • 1
  • 2

1 Answers1

8

It's hard to tell why exactly that's the choice they took. Only an Apple employee would be able to help us in explaining this. However, I don't think it's an explicit exclusion of conceal by itself.

When you compile Vim, the configure script accepts an option called --with-features which controls a set of features to be enabled or disabled.

--with-features=TYPE.  tiny, small, normal, big or huge (default: huge)

from src/auto/configure L1532

The conceal feature is only enabled with big or huge, and dependent on +syntax:

/*
 * +conceal     'conceal' option.  Needs syntax highlighting
 *          as this is how the concealed text is defined.
 */
#if defined(FEAT_BIG) && defined(FEAT_SYN_HL)
# define FEAT_CONCEAL
#endif

from src/feature.h L496-502

You can see a handy list of what is included in each feature set by checking :h +feature-list. Thus, judging by the other features, I'd say conceal is disabled just because they are compiling with the feature set option --with-features=normal.

It's highly recommended to install a newer and more complete Vim. Replacing the system program might not be optimal, but that's exactly why there are plenty of alternatives which take care of doing it right and keeping Vim updated and complete. If you have Homebrew installed, a simple command will do:

$ brew install vim

Alternatively, if you have MacVim you can also use its internal executable by making an alias on your shell or something similar.

sidyll
  • 57,726
  • 14
  • 108
  • 151
  • hmm, i might have been unfair to point out 'conceal' among other missing features. the feature is often super convenient for japanese users (and others in non-alphabetish culture maybe) and i couldn't think of any reason not to include it so was unconsciously supposing all vim > 7.3 would have it. i was expecting an answer like "it collides with foo bar apple provides" or one like why apple ships bash version 3, but it may be only a coincident or only apple employees know... of course i've already brew-installed vim and enjoying the plugin. Thanks a lot ! – Akko Yukky Sep 22 '18 at 12:47
  • I suppose the question then becomes why `conceal` is considered a "big" feature and not a "normal" one... – Chris N Oct 21 '19 at 04:13