Macvim and vimrc

92 views
Skip to first unread message

Zoltan Kiraly

unread,
Jun 13, 2013, 7:39:22 PM6/13/13
to vim...@googlegroups.com
Hi,
I'm using vim on a linux computer, and I would like to use the same .vimrc with Macvim. Is it possible? Where to put the .vimrc file on OS X for MacVim?

Thank you!

Chris Schneider

unread,
Jun 13, 2013, 8:40:36 PM6/13/13
to vim...@googlegroups.com
Your .vimrc will go in your home directory (on a mac that's /Users/username), but otherwise it's just ~ and will get picked up by macvim.

If you need to do different configuration in your mac's .vimrc, you can do an if block like this to separate out the code.

if has('gui_macvim')
  .... 
endif



--
--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Zoltan Kiraly

unread,
Jun 14, 2013, 4:05:05 AM6/14/13
to vim...@googlegroups.com
Thank you. I was a bit confused because I read someting about .gvimrc.
So, I just need to copy my .vimrc from linux to mac. Thank you!

Thomas Bohn

unread,
Jun 14, 2013, 5:58:17 AM6/14/13
to vim...@googlegroups.com
2013/6/14 Zoltan Kiraly <zol...@gmail.com>:
> I was a bit confused because I read someting about .gvimrc.
> So, I just need to copy my .vimrc from linux to mac.

You can also use the gvimrc. I use it for options which are only
useful for MacVim but not for Vim.

My .gvimrc looks like this:

set columns=100
set lines=60
set guioptions=cegmLt
set guifont=Source\ Code\ Pro:h14
set guicursor=n:blinkon0
set transparency=10
set background=light

Which also can be done with an if in vimrc. I guess it is a question
of taste how you do it. Well, some options won't work on the GTK+
version of Vim.

Thomas

Thomas Bohn

unread,
Jun 13, 2013, 8:39:45 PM6/13/13
to vim...@googlegroups.com
Should work, just put it in your home directory. Just like on Linux.

2013/6/14 Zoltan Kiraly <zol...@gmail.com>:
> Hi,
> I'm using vim on a linux computer, and I would like to use the same .vimrc with Macvim. Is it possible? Where to put the .vimrc file on OS X for MacVim?
>
> Thank you!
>
Reply all
Reply to author
Forward
0 new messages