" LLVM coding guidelines conformance for VIM " $Revision: 97273 $ " " Maintainer: The LLVM Team, http://llvm.org " WARNING: Read before you source in all these commands and macros! Some " of them may change VIM behavior that you depend on. " " You can run VIM with these settings without changing your current setup with: " $ vim -u /path/to/llvm/utils/vim/vimrc " It's VIM, not VI set nocompatible " A tab produces a 2-space indentation set softtabstop=2 set shiftwidth=2 set expandtab " Highlight trailing whitespace and lines longer than 80 columns. highlight LongLine ctermbg=DarkYellow guibg=DarkYellow highlight WhitespaceEOL ctermbg=DarkYellow guibg=DarkYellow if v:version >= 702 " Lines longer than 80 columns. au BufWinEnter * let w:m0=matchadd('LongLine', '\%>80v.\+', -1) " Whitespace at the end of a line. This little dance suppresses " whitespace that has just been typed. au BufWinEnter * let w:m1=matchadd('WhitespaceEOL', '\s\+$', -1) au InsertEnter * call matchdelete(w:m1) au InsertEnter * let w:m2=matchadd('WhitespaceEOL', '\s\+\%#\@80v.\+/ au InsertEnter * syntax match WhitespaceEOL /\s\+\%#\@