On macOS High Sierra, the system vim (/usr/bin/vim) is compiled as a
"Normal Version" binary without the "macunix" feature, and
has("macunix") returns 0. In the scripts, this breaks the code guarded
by such condition, intended to work on macOS platform. For example, the
platform- and configuration-specific forward search with ls is
broken.
To fix this, use has("osx") in the place of has("macunix"). The former
is more inclusive than the latter and will return 1 on the High Sierra
system vim, therefore correctly identifying the platform.
The Homebrew vim is compiled as "Huge Version" binary, and
has("macunix") works in it. Therefore, the change is not necessary, but
still compatible.
On macOS High Sierra, the system vim (/usr/bin/vim) is compiled as a "Normal Version" binary without the "macunix" feature, and has("macunix") returns 0. In the scripts, this breaks the code guarded by such condition, intended to work on macOS platform. For example, the platform- and configuration-specific forward search withls is
broken.
To fix this, use has("osx") in the place of has("macunix"). The former is more inclusive than the latter and will return 1 on the High Sierra system vim, therefore correctly identifying the platform.
The Homebrew vim is compiled as "Huge Version" binary, and has("macunix") works in it. Therefore, the change is not necessary, but still compatible.