I had the annoying problem that MacVim would stop opening files (it would open a blank file) if I had files of the same kind already open. The problem was common but unpredictable in its occurrence, i.e. would just happen after a random number of file open actions.
I uninstalled my plugins and removed .vimrc and .gvimrc.
I have now installed Vundle as plugin manager, but the same issue presented itself with Pathogen (which I have now installed). Now my .vimrc looks like:
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'Vim-R-plugin'
filetype plugin indent on
set modelines=0
set guifont=letteragbeta:h17
syntax on " colour hilighting
set tabstop=2 " no. of space chars when tab key is pressed
set shiftwidth=2 " number of space characters inserted for indentation
set expandtab " space chars instead of <TAB> when tab key is pressed
set softtabstop=2 " makes the spaces feel like real tabs
set bs=2 " allow backspacing over everything in insert mode
set ai " Always set auto-indenting on
set history=50 " keep 50 lines of command history
set ruler " Show the cursor position all the time
set smartindent
set hlsearch " highlight search
highlight Comment ctermfg=lightblue " make comments readable on black background
set viminfo='10,\"100,:20,%,n~/.viminfo
if &term=="xterm" || &term=="xterm-color"
:map! <Esc>Oq 1
:map! <Esc>Or 2
:map! <Esc>Os 3
:map! <Esc>Ot 4
:map! <Esc>Ou 5
:map! <Esc>Ov 6
:map! <Esc>Ow 7
:map! <Esc>Ox 8
:map! <Esc>Oy 9
:map! <Esc>Op 0
:map! <Esc>On .
:map! <Esc>OQ /
:map! <Esc>OR *
:map! <Esc>Ol +
:map! <Esc>OS -
endif
colorscheme molokai
let g:molokai_original = 1
set number
set formatoptions=l
set lbr
set tw=150
set timeoutlen=750
if &term =~ "xterm-256color\\|rxvt"
let &t_SI = "\033]Pl4682b4\033\\"
let &t_EI = "\033]Pla0522d\033\\"
autocmd VimLeave * silent !echo -ne "\033]Plc1ffc1\033\\"
endif
:set viminfo^=h
The plugin is installed correctly, but if I try to open a R source file (foo.R) MacVim crashes, with this in console:
11/10/2013 15:30:26.085 MacVim[70425]: *** -[NSMachPort handlePortMessage:]: dropping incoming DO message because the connection is invalid
What is going on?
In case you need, my .gvimrc is:
set tabstop=2 " no. of space chars when tab key is pressed
set shiftwidth=2 " number of space characters inserted for indentation
set expandtab " space chars instead of <TAB> when tab key is pressed
set softtabstop=2 " makes the spaces feel like real tabs
set bs=2 " allow backspacing over everything in insert mode
set ai " Always set auto-indenting on
set history=50 " keep 50 lines of command history
set ruler " Show the cursor position all the time
set smartindent
set hlsearch " highlight search
colorscheme molokai
let g:molokai_original = 1
set formatoptions=l
set lbr
set tw=150
highlight Cursor guifg=white guibg=sienna
highlight iCursor guifg=white guibg=steelblue
set guicursor=n-v-c:block-Cursor
set guicursor+=i:block-iCursor
set guicursor+=a:blinkon0
BW
F
OS 10.8.5
MacVim Snapshot 71 for Mountain Lion.
BW
F