選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

vimrc 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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#begin()
  21. Plugin 'gmarik/Vundle.vim'
  22. Plugin 'scrooloose/syntastic.git'
  23. Plugin 'myusuf3/numbers.vim'
  24. call vundle#end()
  25. let g:syntastic_c_compiler='clang' " Use clang instead of gcc
  26. let g:syntastic_c_compiler_options='-Wall -Wextra -pedantic -std=c99'
  27. let g:syntastic_c_check_header=1 " Check headers in c
  28. let g:syntastic_cpp_compiler='clang++' " Use clang++ instead of g++
  29. let g:syntastic_cpp_compiler_options='-Wall -Wextra -pedantic -std=c++11'
  30. let g:syntastic_cpp_check_header=1 " Check headers in c++
  31. let g:syntastic_ocaml_use_ocamlc=1 " Use ocamlc instead of ocamlopt
  32. let g:numbers_exclude=[ 'nerdtree', 'undotree', 'diffpanel', 'tagbar' ]
  33. filetype plugin indent on
  34. autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
  35. set relativenumber
  36. set number
  37. let mapleader=","
  38. nnoremap <leader>n :NumbersToggle<CR>
  39. inoremap <Nul> <C-n>
  40. noremap <expr> <silent> <Home> col('.') == match(getline('.'),'\S')+1 ? '0' : '^'
  41. imap <silent> <Home> <C-O><Home>