Config File Collection
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 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. "
  2. " General Options
  3. "
  4. " Disable compatibility mode
  5. "set nocp
  6. "
  7. " Indent Options
  8. "
  9. " New lines inherit the indentation of previous lines.
  10. set autoindent
  11. " Convert tabs to spaces.
  12. set expandtab
  13. " Enable indentation rules that are file-type specific.
  14. "set filetype indent on
  15. " When shifting lines, round the indentation to the nearest multiple of "shiftwidth."
  16. set shiftround
  17. " When shifting, indent using four spaces.
  18. set shiftwidth=4
  19. " Insert "tabstop" number of spaces when the "tab" key is pressed.
  20. set smarttab
  21. " Indent using four spaces.
  22. set tabstop=4
  23. "
  24. " Search Options
  25. "
  26. " Enable search highlighting.
  27. set hlsearch
  28. " Ignore case when searching.
  29. set ignorecase
  30. " Incremental search that shows partial matches.
  31. set incsearch
  32. " Automatically switch search to case-sensitive when search query contains an uppercase letter.
  33. set smartcase
  34. "
  35. " Performance Options
  36. "
  37. " Limit the files searched for auto-completes.
  38. "set complete-=i
  39. " Don't update screen during macro and script execution.
  40. "set lazyredraw
  41. "
  42. " Text Rendering Options
  43. "
  44. " Always try to show a paragraph's last line.
  45. "set display+=lastline
  46. " Use an encoding that supports unicode.
  47. set encoding=utf-8
  48. " Avoid wrapping a line in the middle of a word.
  49. set linebreak
  50. " The number of screen lines to keep above and below the cursor.
  51. set scrolloff=3
  52. " The number of screen columns to keep to the left and right of the cursor.
  53. set sidescrolloff=5
  54. " Enable syntax highlighting.
  55. syntax enable
  56. " Enable line wrapping.
  57. set wrap
  58. "
  59. " User Interface Options
  60. "
  61. " Always display the status bar.
  62. set laststatus=2
  63. " Statusline color
  64. " highlight mode color
  65. highlight NormalColor ctermbg=10 ctermfg=0
  66. highlight InsertColor ctermbg=14 ctermfg=0
  67. highlight VisualColor ctermbg=9 ctermfg=0
  68. highlight CommandColor ctermbg=15 ctermfg=0
  69. set statusline=
  70. set statusline+=%#NormalColor#%{(mode()=='n')?'\ \ NORMAL\ \ ':''}
  71. set statusline+=%#InsertColor#%{(mode()=='i')?'\ \ INSERT\ \ ':''}
  72. set statusline+=%#VisualColor#%{(mode()=='v')?'\ \ VISUAL\ \ ':''}
  73. set statusline+=%#CommandColor#%{(mode()=='c')?'\ \ COMMAND\ ':''}
  74. set statusline+=%#NormalColor#
  75. set statusline+=%f " file name
  76. set statusline+=[%{strlen(&fenc)?&fenc:'none'}, "file encoding
  77. set statusline+=%{&ff}] "file format
  78. set statusline+=%y "filetype
  79. set statusline+=%h "help file flag
  80. set statusline+=[%{getbufvar(bufnr('%'),'&mod')?'modified':'saved'}]
  81. "modified flag
  82. set statusline+=%r "read only flag
  83. set statusline+=\ %= " align left
  84. set statusline+=Line:%l/%L[%p%%] " line X of Y [percent of file]
  85. set statusline+=\ Col:%c " current column
  86. "set statusline+=\ Buf:%n " Buffer number
  87. set statusline+=\ [0x%B]\ " ASCII and byte code under cursor
  88. " Always show cursor position.
  89. "set ruler
  90. " Display command line's tab complete options as a menu.
  91. "set wildmenu
  92. " Maximum number of tab pages that can be opened from the command line.
  93. "set tabpagemax=50
  94. " Change color scheme.
  95. "set colorscheme wombat256mod
  96. " Highlight the line currently under cursor.
  97. set cursorline
  98. " Show line numbers on the sidebar.
  99. set number
  100. " Show line number on the current line and relative numbers on all other lines.
  101. set relativenumber
  102. " Disable beep on errors.
  103. set noerrorbells
  104. " Flash the screen instead of beeping on errors.
  105. set visualbell
  106. " Enable mouse for scrolling and resizing.
  107. "set mouse=a
  108. " Set the window's title, reflecting the file currently being edited.
  109. "set title
  110. " Use colors that suit a dark background.
  111. "set background=dark
  112. "
  113. " Code Folding Options
  114. "
  115. " Fold based on indention levels.
  116. "set foldmethod=indent
  117. " Only fold up to three nested levels.
  118. "set foldnestmax=3
  119. " Disable folding by default.
  120. "set nofoldenable
  121. "
  122. " Miscellaneous Options
  123. "
  124. " Automatically re-read files if unmodified inside Vim.
  125. "set autoread
  126. " Allow backspacing over indention, line breaks and insertion start.
  127. "set backspace=indent,eol,start
  128. " Directory to store backup files.
  129. set backupdir=~/.cache/vim
  130. " Display a confirmation dialog when closing an unsaved file.
  131. "set confirm
  132. " Directory to store swap files.
  133. set dir=~/.cache/vim
  134. " Delete comment characters when joining lines.
  135. "set formatoptions+=j
  136. " Hide files in the background instead of closing them.
  137. "set hidden
  138. " Increase the undo limit.
  139. set history=1000
  140. " Ignore file's mode lines; use vimrc configurations instead.
  141. "set nomodeline
  142. " Disable swap files.
  143. "set noswapfile
  144. " Interpret octal as decimal when incrementing numbers.
  145. "set nrformats-=octal
  146. " The shell used to execute commands.
  147. "set shell
  148. " Enable spellchecking.
  149. "set spell
  150. " Ignore files matching these patterns when opening files based on a glob pattern.
  151. "set wildignore+=.pyc,.swp