Config File Collection
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

.vimrc 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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 NormalColor ctermbg=11 ctermfg=0
  65. highlight InsertColor ctermbg=14 ctermfg=0
  66. highlight VisualColor ctermbg=9 ctermfg=0
  67. highlight CommandColor ctermbg=15 ctermfg=0
  68. highlight FilenameColor ctermbg=10 ctermfg=0
  69. highlight RightColor ctermbg=8 ctermfg=15
  70. set statusline=
  71. set statusline+=%#NormalColor#%{(mode()=='n')?'\ \ NORMAL\ \ ':''}
  72. set statusline+=%#InsertColor#%{(mode()=='i')?'\ \ INSERT\ \ ':''}
  73. set statusline+=%#VisualColor#%{(mode()=='v')?'\ \ VISUAL\ \ ':''}
  74. set statusline+=%#CommandColor#%{(mode()=='c')?'\ \ COMMAND\ ':''}
  75. set statusline+=%#FilenameColor# " Statusline format NormalColor
  76. set statusline+=\ %f " Filename
  77. set statusline+=\ %m " Modified token
  78. set statusline+=%= " Allign right
  79. set statusline+=%#RightColor# " Statusline format CursorColumn
  80. set statusline+=\ %y " file type
  81. set statusline+=\ %{&fileencoding?&fileencoding:&encoding} " encoding
  82. set statusline+=\[%{&fileformat}\] " file format
  83. set statusline+=\ %p%% " line percent
  84. set statusline+=\ %l:%c " line:column
  85. set statusline+=\ [0x%B]\ " ASCII hex code under cursor
  86. " Always show cursor position.
  87. "set ruler
  88. " Display command line's tab complete options as a menu.
  89. "set wildmenu
  90. " Maximum number of tab pages that can be opened from the command line.
  91. "set tabpagemax=50
  92. " Change color scheme.
  93. "set colorscheme wombat256mod
  94. " Highlight the line currently under cursor.
  95. set cursorline
  96. " Show line numbers on the sidebar.
  97. set number
  98. " Show line number on the current line and relative numbers on all other lines.
  99. set relativenumber
  100. " Disable beep on errors.
  101. set noerrorbells
  102. " Flash the screen instead of beeping on errors.
  103. set visualbell
  104. " Enable mouse for scrolling and resizing.
  105. "set mouse=a
  106. " Set the window's title, reflecting the file currently being edited.
  107. "set title
  108. " Use colors that suit a dark background.
  109. "set background=dark
  110. "
  111. " Code Folding Options
  112. "
  113. " Fold based on indention levels.
  114. "set foldmethod=indent
  115. " Only fold up to three nested levels.
  116. "set foldnestmax=3
  117. " Disable folding by default.
  118. "set nofoldenable
  119. "
  120. " Miscellaneous Options
  121. "
  122. " Automatically re-read files if unmodified inside Vim.
  123. "set autoread
  124. " Allow backspacing over indention, line breaks and insertion start.
  125. "set backspace=indent,eol,start
  126. " Directory to store backup files.
  127. set backupdir=~/.cache/vim
  128. " Display a confirmation dialog when closing an unsaved file.
  129. "set confirm
  130. " Directory to store swap files.
  131. set dir=~/.cache/vim
  132. " Delete comment characters when joining lines.
  133. "set formatoptions+=j
  134. " Hide files in the background instead of closing them.
  135. "set hidden
  136. " Increase the undo limit.
  137. set history=1000
  138. " Ignore file's mode lines; use vimrc configurations instead.
  139. "set nomodeline
  140. " Disable swap files.
  141. "set noswapfile
  142. " Interpret octal as decimal when incrementing numbers.
  143. "set nrformats-=octal
  144. " The shell used to execute commands.
  145. "set shell
  146. " Enable spellchecking.
  147. "set spell
  148. " Ignore files matching these patterns when opening files based on a glob pattern.
  149. "set wildignore+=.pyc,.swp