Config File Collection
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

vimrc 5.0KB

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