You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

vimrc 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. set number
  2. syntax on
  3. set mouse=a
  4. highlight ExtraWhitespace ctermbg=red guibg=red
  5. match ExtraWhitespace /\s\+$/
  6. set colorcolumn=80
  7. highlight colorcolumn ctermbg=green guibg=green
  8. set hlsearch
  9. nnoremap <F3> :noh<CR>
  10. nnoremap <F4> :A<CR>
  11. set nocompatible
  12. set expandtab
  13. set shiftwidth=2
  14. set softtabstop=2
  15. set smarttab
  16. set tabstop=8
  17. "plugin
  18. filetype off
  19. set rtp+=~/.vim/bundle/Vundle.vim
  20. call vundle#rc()
  21. Plugin 'gmarik/Vundle.vim'
  22. Plugin 'scrooloose/syntastic.git'
  23. Plugin 'myusuf3/numbers.vim'
  24. let g:syntastic_c_compiler='clang' " Use clang instead of gcc
  25. let g:syntastic_c_compiler_options='-Wall -Wextra -pedantic -std=c99'
  26. let g:syntastic_c_check_header=1 " Check headers in c
  27. let g:syntastic_cpp_compiler='clang++' " Use clang++ instead of g++
  28. let g:syntastic_cpp_compiler_options='-Wall -Wextra -pedantic -std=c++11'
  29. let g:syntastic_cpp_check_header=1 " Check headers in c++
  30. let g:syntastic_ocaml_use_ocamlc=1 " Use ocamlc instead of ocamlopt
  31. let g:numbers_exclude=[ 'nerdtree', 'undotree', 'diffpanel', 'tagbar' ]
  32. filetype plugin indent on
  33. autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
  34. set relativenumber
  35. set number
  36. let mapleader=","
  37. nnoremap <leader>n :NumbersToggle<CR>
  38. inoremap <Nul> <C-n>
  39. noremap <expr> <silent> <Home> col('.') == match(getline('.'),'\S')+1 ? '0' : '^'
  40. imap <silent> <Home> <C-O><Home>