Advertisement
Guest User

.vimrc config

a guest
May 21st, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 4.07 KB | None | 0 0
  1. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  2. "                                preamble                                 "
  3. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  4.  
  5. set nocompatible
  6. set encoding=utf-8
  7.  
  8. " Necessary for Vundle, should be turned on after plugins setup
  9. filetype off
  10.  
  11. " Use space as leader key
  12. nnoremap <space> <nop>
  13. let mapleader = "\<space>"
  14.  
  15. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  16. "                          Vundle configuration                           "
  17. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  18.  
  19. set rtp+=~/.vim/bundle/Vundle.vim
  20. call vundle#begin()
  21.  
  22. " let Vundle manage itself
  23. Plugin 'VundleVim/Vundle.vim'
  24.  
  25. "TODO: Should choose only one theme for next usage
  26. Plugin 'liuchengxu/space-vim-dark'
  27. Plugin 'rakr/vim-one'
  28. Plugin 'rakr/vim-two-firewatch'
  29.  
  30. Plugin 'vim-ruby/vim-ruby'
  31. Plugin 'klen/python-mode'
  32. Plugin 'jcfaria/Vim-R-plugin'
  33. Plugin 'keith/swift.vim'
  34. Plugin 'dart-lang/dart-vim-plugin'
  35.  
  36. Plugin 'godlygeek/tabular'
  37. Plugin 'plasticboy/vim-markdown'
  38. Plugin 'JamshedVesuna/vim-markdown-preview'
  39. Plugin 'lervag/vimtex'
  40. Plugin 'luochen1990/rainbow'
  41. Plugin 'vim-airline/vim-airline-themes'
  42. Plugin 'bling/vim-airline'
  43. Plugin 'tpope/vim-fugitive'
  44. Plugin 'lepture/vim-velocity'
  45. Plugin 'scrooloose/nerdtree'
  46. Plugin 'scrooloose/nerdcommenter'
  47. Plugin 'danro/rename.vim'
  48.  
  49. call vundle#end()
  50.  
  51.  
  52. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  53. "                        turn on filetype plugins                         "
  54. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  55.  
  56. filetype plugin on
  57. filetype indent plugin on
  58.  
  59. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  60. "                               Color Scheme                            "
  61. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  62.  
  63. "set t_Co=256
  64. set termguicolors
  65. syntax enable
  66. "if (has('termguicolors'))
  67. "    set termguicolors
  68. "endif
  69.  
  70.  
  71. """ One color theme
  72. set background=dark
  73. colorscheme one
  74. let g:one_allow_italics = 1
  75.  
  76. """ Two Firewatch color theme
  77. "set background=dark
  78. "let g:two_firewatch_italics=1
  79. "colo two-firewatch
  80.  
  81.  
  82. set cursorline
  83.  
  84. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  85. "                           vimrc augroup                                 "
  86. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  87.  
  88. " TODO: This custom group should use more precisely
  89. augroup vimrc
  90.     autocmd!
  91. augroup END
  92.  
  93. autocmd! vimrc bufwritepost .vimrc source %
  94.  
  95. "" Commenting blocks of code
  96. autocmd FileType c,cpp,m,java,scala,swift   let b:comment_leader = '// '
  97. autocmd FileType sh,ruby,python             let b:comment_leader = '# '
  98. autocmd FileType conf,fstab                 let b:comment_leader = '# '
  99. autocmd FileType tex                        let b:comment_leader = '% '
  100. autocmd FileType vim                        let b:comment_leader = '" '
  101.  
  102. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  103. "                            General settings                             "
  104. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  105.  
  106. "set number
  107.  
  108. set clipboard=unnamed
  109. set backspace=indent,eol,start
  110.  
  111. set exrc
  112. set secure
  113.  
  114. set autoread
  115.  
  116. " Tabulation
  117. set tabstop=4
  118. set softtabstop=4
  119. set shiftwidth=4
  120. set shiftround
  121. set expandtab
  122.  
  123. " Indentation
  124. set nowrap
  125. set autoindent
  126. set smartindent
  127. set colorcolumn=120
  128.  
  129. set showmatch
  130.  
  131. " Searching
  132. set hlsearch
  133. set incsearch
  134. set ignorecase
  135. set smartcase
  136.  
  137. set showcmd
  138. set ruler
  139. set rulerformat=%-13.(%l,%c%V%)\ %P
  140.  
  141. set textwidth=120
  142.  
  143. set wildmenu
  144. set wildmode=longest:list,full
  145. set listchars=tab:▸\ ,eol:¬
  146.  
  147. " The order of using encodings and files formats
  148. set ffs=unix,dos,mac
  149. set fencs=utf-8,cp1251,koi8-r,ucs-2,cp-866
  150.  
  151. " Set up mouse in all vim modes
  152. if has('mouse')
  153.     set mouse=a
  154. endif
  155.  
  156. " macOS only
  157. if has("mac") || has("macunix")
  158.     set ambiwidth=double
  159. endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement