CLI config/dotfiles
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.

98 lines
3.7 KiB

  1. " All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
  2. " /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
  3. " you can find below. If you wish to change any of those settings, you should
  4. " do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten
  5. " everytime an upgrade of the vim packages is performed. It is recommended to
  6. " make changes after sourcing debian.vim since it alters the value of the
  7. " 'compatible' option.
  8. " Uncomment the next line to make Vim more Vi-compatible
  9. " NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes numerous
  10. " options, so any other options should be set AFTER setting 'compatible'.
  11. "set compatible
  12. " Vim5 and later versions support syntax highlighting. Uncommenting the
  13. " following enables syntax highlighting by default.
  14. if has("syntax")
  15. set t_Co=256
  16. syntax on
  17. " Uncomment the following 'let' lines if using xter16 color scheme
  18. " Select colormap: 'soft', 'softlight', 'standard', or 'allblue'
  19. let xterm16_colormap = 'allblue'
  20. " Select brightness: 'low', 'med', 'high', 'default', or custom levels
  21. let xterm16_brightness = 'high'
  22. "Other override options:
  23. let xterm16fg_Cursor = '555'
  24. let xterm16bg_Normal = 'none'
  25. "Set color scheme
  26. colorscheme xterm16
  27. endif
  28. " If using a dark background within the editing area and syntax highlighting
  29. " turn on this option as well
  30. set background=dark
  31. " Uncomment the following to have Vim jump to the last position when
  32. " reopening a file
  33. if has("autocmd")
  34. au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
  35. endif
  36. " Uncomment the following to have Vim load indentation rules and plugins
  37. " according to the detected filetype.
  38. if has("autocmd")
  39. filetype plugin indent on
  40. endif
  41. " The following are commented out as they cause vim to behave a lot
  42. " differently from regular Vi. They are highly recommended though.
  43. set showcmd " Show (partial) command in status line.
  44. set showmatch " Show matching brackets.
  45. set ignorecase " Do case insensitive matching
  46. set smartcase " Do smart case matching
  47. "set incsearch " Incremental search
  48. "set autowrite " Automatically save before commands like :next and :make
  49. "set hidden " Hide buffers when they are abandoned
  50. set mouse=a " Enable mouse usage (all modes)
  51. set nohlsearch " Turn off search highlighting
  52. "set expandtab " Turn tabs to spaces
  53. set shiftwidth=4 " Auto-indent amount when using cindent, <<, >>, etc.
  54. set softtabstop=4 " How many spaces represent a tab
  55. set tabstop=4 " Real tab size
  56. set autoindent " Indent level of new line set by previous line
  57. "set smartindent " Attempt to intelligently guess level of indent for new line
  58. set cindent " Attempt to intelligently guess level of indent for new line
  59. set cinkeys-=0# " Don't un-indent comments
  60. set indentkeys-=0# " Don't un-indent comments
  61. set nf=octal,hex,alpha " additional ctrl-a increments
  62. set spell spelllang=en_us " Set spell check language
  63. set scrolloff=5 " Add visible lines beyond cursor at top or bottom of window
  64. noremap n nzz
  65. noremap N Nzz
  66. noremap * *zz
  67. noremap # #zz
  68. noremap g* g*zz
  69. noremap g# g#zz
  70. autocmd FileType plaintex,tex,latex syntax spell toplevel
  71. autocmd FileType plaintex,tex,latex set tw=80
  72. autocmd FileType pug,jade set tw=80
  73. autocmd FileType text set tw=80 nocindent
  74. set backspace=indent,eol,start
  75. au BufNewFile,BufRead *.cu set filetype=c
  76. au BufNewFile,BufRead *.tp set filetype=taskpaper
  77. aug python
  78. " to override ftype/python.vim
  79. au FileType python setlocal ts=4 sts=4 sw=4 noexpandtab
  80. aug end
  81. " Source a global configuration file if available
  82. if filereadable("/etc/vim/vimrc.local")
  83. source /etc/vim/vimrc.local
  84. endif
  85. syntax spell toplevel