gerw / vim-latex-suite

71 stars 16 forks source link

Fix macOS detection in scripts on High Sierra. #33

Closed congma closed 6 years ago

congma commented 6 years ago

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.

gerw commented 6 years ago

Thank you!