0

This question already has an answer here:

I am using vim in a terminal on my mac.

I understand that the command:

echo has('mac')

should return 1 (it does on macvim), because it's running on a mac. But it returns 0. Can anyone tell me why this is, and if there's a more reliable way of detecting if vim is running on osx?

EDIT: :echo has('macunix') also returns 0

EDIT2: :echo has('osx') also returns 0

marked as duplicate by Rich, peterh says reinstate Monica, Community May 27 at 20:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • try has('macunix') – Christian Brabandt May 27 at 11:18
  • @ChristianBrabandt I meant to add that, thanks for the reminder – Joe May 27 at 11:29
  • echo has('osx') ? – Ashok May 27 at 12:08
  • 2
    See the second answer, by romainl, here: Detect OS in Vimscript. You need to use uname. – Rich May 27 at 18:53

Browse other questions tagged or ask your own question.