how do I detect OS X in my .vimrc file, so certain configurations will only apply to OS X?

前端 未结 7 663
庸人自扰
庸人自扰 2020-12-12 15:18

I use my .vimrc file on my laptop (OS X) and several servers (Solaris & Linux), and could hypothetically someday use it on a Windows box. I know how to detect unix gene

7条回答
  •  无人及你
    2020-12-12 15:32

    You want macunix. To quote :h feature-list:

    mac     Macintosh version of Vim.
    macunix Macintosh version of Vim, using Unix files (OS-X).
    

    mac, AFAIK, only applies to old-school Macs, where \r is the line separator.

提交回复
热议问题