Config File Collection
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. "
  2. " General Options
  3. "
  4. " Disable compatibility mode
  5. set nocompatible
  6. "
  7. " File-Menu
  8. "
  9. " Enable plugin
  10. filetype plugin on
  11. " Search down into subfolders. Provides tab-completion for all file-related tasks
  12. set path+=**
  13. "
  14. " Tagging (^] go to tag source, ^t go back)
  15. "
  16. command! MakeTags !ctags -R .
  17. "
  18. " File Browsing
  19. "
  20. let g:netrw_banner=0 " disable annoying banner
  21. let g:netrw_browse_split=4 " open in prior window
  22. let g:netrw_altv=1 " open splits to the right
  23. let g:netrw_liststyle=3 " tree view
  24. let g:netrw_list_hide=netrw_gitignore#Hide()
  25. let g:netrw_list_hide.=',\(^}|\s\s)\zs\.\S\+'
  26. " Now WE CAN:
  27. " - edit a folder to open a file browser
  28. " - <CR>/v/t to open in an h-split/v-spli/tab
  29. " - check |netrw-browse-maps| for more mappings
  30. "
  31. " Snippets
  32. "
  33. nnoremap ,pyclass :-1read $HOME/.vim/skeletons/class.py<CR>6l
  34. "
  35. " Indent Options
  36. "
  37. " New lines inherit the indentation of previous lines.
  38. set autoindent
  39. " Convert tabs to spaces.
  40. set expandtab
  41. " Enable indentation rules that are file-type specific.
  42. "filetype indent on
  43. " When shifting lines, round the indentation to the nearest multiple of "shiftwidth."
  44. "set shiftround
  45. " When shifting, indent using four spaces.
  46. "set shiftwidth=4
  47. " Insert "tabstop" number of spaces when the "tab" key is pressed.
  48. "set smarttab
  49. " Indent using four spaces.
  50. set tabstop=4
  51. "
  52. " Search Options
  53. "
  54. " Enable search highlighting.
  55. set hlsearch
  56. " Ignore case when searching.
  57. set ignorecase
  58. " Incremental search that shows partial matches.
  59. set incsearch
  60. " Automatically switch search to case-sensitive when search query contains an uppercase letter.
  61. set smartcase
  62. "
  63. " Performance Options
  64. "
  65. " Limit the files searched for auto-completes.
  66. "set complete-=i
  67. " Don't update screen during macro and script execution.
  68. "set lazyredraw
  69. "
  70. " Text Rendering Options
  71. "
  72. " Always try to show a paragraph's last line.
  73. "set display+=lastline
  74. " Use an encoding that supports unicode.
  75. set encoding=utf-8
  76. " Avoid wrapping a line in the middle of a word.
  77. set linebreak
  78. " The number of screen lines to keep above and below the cursor.
  79. set scrolloff=3
  80. " The number of screen columns to keep to the left and right of the cursor.
  81. set sidescrolloff=5
  82. " Enable syntax highlighting.
  83. syntax enable
  84. " Enable line wrapping.
  85. set wrap
  86. "
  87. " User Interface Options
  88. "
  89. colorscheme elflord
  90. " Always display the status bar.
  91. set laststatus=2
  92. " Statusline color
  93. highlight NormalColor ctermbg=11 ctermfg=0
  94. highlight InsertColor ctermbg=14 ctermfg=0
  95. highlight ReplaceColor ctermbg=13 ctermfg=0
  96. highlight VisualColor ctermbg=9 ctermfg=0
  97. highlight CommandColor ctermbg=15 ctermfg=0
  98. highlight FilenameColor ctermbg=10 ctermfg=0
  99. highlight RightColor ctermbg=8 ctermfg=15
  100. set statusline=
  101. set statusline+=%#NormalColor#%{(mode()=='n')?'\ \ NORMAL\ \ ':''}
  102. set statusline+=%#InsertColor#%{(mode()=='i')?'\ \ INSERT\ \ ':''}
  103. set statusline+=%#ReplaceColor#%{(mode()=='r')?'\ \ REPLACE\ ':''}
  104. set statusline+=%#VisualColor#%{(mode()=='v')?'\ \ VISUAL\ \ ':''}
  105. set statusline+=%#CommandColor#%{(mode()=='c')?'\ \ COMMAND\ ':''}
  106. set statusline+=%#FilenameColor# " Statusline format NormalColor
  107. set statusline+=\ %f " Filename
  108. set statusline+=\ %m " Modified token
  109. set statusline+=%= " Allign right
  110. set statusline+=%#RightColor# " Statusline format CursorColumn
  111. set statusline+=\ %y " file type
  112. set statusline+=\ %{&fileencoding?&fileencoding:&encoding} " encoding
  113. set statusline+=\[%{&fileformat}\] " file format
  114. set statusline+=\ %p%% " line percent
  115. set statusline+=\ %l:%c " line:column
  116. set statusline+=\ [0x%B]\ " ASCII hex code under cursor
  117. " Always show cursor position.
  118. "set ruler
  119. " Display command line's tab complete options as a menu.
  120. set wildmenu
  121. " Maximum number of tab pages that can be opened from the command line.
  122. "set tabpagemax=50
  123. " Change color scheme.
  124. "set colorscheme wombat256mod
  125. " Highlight the line currently under cursor.
  126. "set cursorline
  127. " Show line numbers on the sidebar.
  128. set number
  129. " Show line number on the current line and relative numbers on all other lines.
  130. set relativenumber
  131. " Disable beep on errors.
  132. set noerrorbells
  133. " Flash the screen instead of beeping on errors.
  134. set visualbell
  135. " Enable mouse for scrolling and resizing.
  136. "set mouse=a
  137. " Set the window's title, reflecting the file currently being edited.
  138. "set title
  139. " Use colors that suit a dark background.
  140. "set background=dark
  141. "
  142. " Code Folding Options
  143. "
  144. " Fold based on indention levels.
  145. "set foldmethod=indent
  146. " Only fold up to three nested levels.
  147. "set foldnestmax=3
  148. " Disable folding by default.
  149. "set nofoldenable
  150. "
  151. " Miscellaneous Options
  152. "
  153. " Automatically re-read files if unmodified inside Vim.
  154. "set autoread
  155. " Allow backspacing over indention, line breaks and insertion start.
  156. "set backspace=indent,eol,start
  157. " Directory to store backup files.
  158. set backupdir=~/.cache/vim
  159. " Display a confirmation dialog when closing an unsaved file.
  160. "set confirm
  161. " Directory to store swap files.
  162. set dir=~/.cache/vim
  163. " Delete comment characters when joining lines.
  164. "set formatoptions+=j
  165. " Hide files in the background instead of closing them.
  166. "set hidden
  167. " Increase the undo limit.
  168. set history=1000
  169. " Ignore file's mode lines; use vimrc configurations instead.
  170. "set nomodeline
  171. " Disable swap files.
  172. "set noswapfile
  173. " Interpret octal as decimal when incrementing numbers.
  174. "set nrformats-=octal
  175. " The shell used to execute commands.
  176. "set shell
  177. " Enable spellchecking.
  178. "set spell
  179. " Ignore files matching these patterns when opening files based on a glob pattern.
  180. set wildignore+=.pyc,.swp