Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I open a file with MacVim, It highlights everything in red.

I am not sure how to get rid of this permanently. How can I do this in .vimrc?

share|improve this question

migrated from stackoverflow.com Apr 4 '13 at 10:32

This question came from our site for professional and enthusiast programmers.

Do you have a strange colorscheme? Do you have toyed with autocommands? –  sjas Apr 3 '13 at 23:03

1 Answer 1

set encoding=utf-8 let mapleader = ',' colorscheme koehler ""colorscheme: " blue, darkblue, default, delek, desert, elflord " evening, koehler, morning, purphy, pablo " peachpuff, ron, shine, slate, solarized, torte, zellner "set cmdheight=1 "set showmatch set gfn=Menlo:h14 "========================================================================= syntax on set showmode set nocompatible " use vim defaults set number " show line numbers set ignorecase " ignore case when searching set title " show title in console title bar set ruler " show the cursor position all the time set scrolloff=0 " keep 3 lines when scrolling set ls=2 " allways show status line, or set laststatus=2 set showcmd " display incomplete commands set expandtab " expand tab to spaces set tabstop=4 " numbers of spaces of tab character set shiftwidth=4 " numbers of spaces to (auto) indent set autoindent " always set autoindenting on set smartindent " smart indent "set cindent " cindent set hlsearch " highlight searches set incsearch " do incremental searching "set visualbell t_vb= " turn off error beep/flash "set novisualbell " turn off visual bell "set ttyfast " smoother changes "set ttyscroll=0 " turn off scrolling, didn't work well with PuTTY "set modeline " last lines in document sets vim mode "set modelines=3 " number lines checked for modelines "set shortmess=atI " Abbreviate messages "set nostartofline " don't jump to first character when paging set whichwrap=b,s,h,l,<,>,[,] " move freely between files "set nowrap " don't wrap lines "set nobackup " do not keep a backup file "set viminfo='20,<50,s10,h "Recursively set the path of the project. set path=$PWD/** set spellfile=~/.vim/spell/mySpellFile.en.utf-8.add

" Keyboard mappings "inoremap nnoremap :buffers:buffer "nnoremap :!pdflatex % nnoremap :!./cmp % nnoremap :setlocal spell spelllang=en_us nnoremap :set nospell nnoremap . nnoremap j nnoremap h nnoremap k nnoremap l "Vimdiff settings "nnoremap u :diffupdate nnoremap du :diffupdate "nnoremap g :diffget "nnoremap p :diffput "remove tailing whitespace nnoremap W :%s/\s+$// nnoremap < :winc < nnoremap > :winc > "copy full file name to clipboard nnoremap cp :let @*= expand("%:p") "cut vnoremap :!pbcopy "copy vnoremap :w !pbcopy "paste in visual mode vnoremap :!pbpaste "paste in normal mode nnoremap :r !pbpaste nnoremap :noh

filetype on au BufNewFile,BufRead *.mrs set filetype=c " set .mrs file to c highlight au BufNewFile,BufRead *.th set filetype=c au BufNewFile,BufRead *.izf set filetype=c au BufNewFile,BufRead *.dat set filetype=c au BufNewFile,BufRead *.org set filetype=c au BufNewFile,BufRead *.bak set filetype=c au BufNewFile,BufRead *.inp set filetype=c

" have Vim jump to the last position when reopening a file if has("autocmd") au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") \| exe "normal! g'\"" | endif endif

share|improve this answer
That is my vimrc file, sorry all lines are connected! –  roozrez Apr 4 '13 at 19:48
I did not have this problem before, it is happening recently! –  roozrez Apr 4 '13 at 19:48
colorscheme koehler –  roozrez Apr 4 '13 at 19:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.