Gentoo Archives: gentoo-alt

From: yegle <cnyegle@×××××.com>
To: "gentoo-alt@l.g.o" <gentoo-alt@l.g.o>
Subject: [gentoo-alt] OS X prefix: vim has("mac") and has("macunix") return false?
Date: Sat, 10 Oct 2015 04:31:29
Message-Id: CAFL5w3VcUC86mMCYp3X8__yrZxsozquDo_4rZH+aBruTs5Rorg@mail.gmail.com
1 I was trying to disable a vundle in OS X by adding the following snippet:
2
3 if !has("mac")
4 Plugin XXXX
5 endif
6
7 But surprisingly it doesn't work. And with some test I found
8 has("mac") and has("macunix") both returned false in vim installed via
9 Prefix and the one comes with OS X.
10
11 $ $HOME/.gentoo/usr/bin/vim +'redir! > /dev/stdout' '+echo has("mac")
12 || has("macunix")' +qall
13 0
14 $ /usr/bin/vim +'redir! > /dev/stdout' '+echo has("mac") ||
15 has("macunix")' +qall
16 0
17
18 But strangely, MacVim (https://github.com/macvim-dev/macvim) correctly
19 recognized this feature test:
20 $ /Applications/MacVim.app/Contents/MacOS/Vim +'redir! >/dev/stdout'
21 +'echo has("mac")' +qall
22 1
23
24 Is there a way to make the vim in prefix behave the same as MacVim?
25
26 Thank you!
27
28
29 --
30 yegle
31 http://about.me/yegle

Replies