Saturday, October 29, 2011

Error in .vimrc

So I copy my .vimrc from my PC to Mac. I put it into ~/. But when start MacVim, there is error message like this:

E488: Trailing characters: nocompatible^M

So the vimrc can't be loaded into MacVim. I googled but their solution doesn't work for me. There is a very simple solution is....


1. In terminal:

$mv ~/.vimrc vimrc
$mvim ~/.gvimrc

2. Then in vim:
:tabe ~/vimrc
:gg
:ctrl+v
:G
:y
:tabp
:p


That means, copy the whole content from "vimrc" to ".gvimrc" in MacVim. So the ".gvimrc" will work well.

No comments:

Post a Comment