Advertisement
Guest User

Untitled

a guest
May 23rd, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.57 KB | None | 0 0
  1. set nocompatible
  2. set backupdir=~/.vim/backups
  3. set undofile
  4. set undodir=~/.vim/undo " remember undos across sessions
  5. set noswapfile
  6.  
  7. " ----------------------------------------------------------------------------
  8. " Text Formatting
  9. " ----------------------------------------------------------------------------
  10.  
  11. call pathogen#infect() " use pathogen
  12. call pathogen#helptags() " call this when installing new plugins
  13.  
  14. syntax on " turn that syntax on
  15.  
  16. set autoindent " automatic indent new lines
  17. set nosmartindent " don't be smart about it
  18. set nowrap " do not wrap lines
  19. set tabstop=4 " a tab is 4 spaces
  20. set shiftwidth=4
  21. set softtabstop=4
  22. set expandtab " expand tabs to spaces
  23. set smarttab
  24.  
  25. filetype plugin on " enable file specific indenting
  26. filetype plugin indent on " indentation on
  27.  
  28. " ----------------------------------------------------------------------------
  29. " Remapping
  30. " ----------------------------------------------------------------------------
  31.  
  32. " lead with ,
  33. let mapleader = ","
  34. let g:mapleader = ","
  35.  
  36. " exit to normal mode and visual mode with ',,'
  37. inoremap <Leader><Leader> <ESC>
  38. vnoremap <Leader><Leader> <ESC
  39.  
  40. " prevent wierd destructive things that I do sometimes
  41. inoremap <C-W> <Nop>
  42. inoremap <C-U> <Nop>
  43.  
  44. " easy saving, closing, dehighlighting and stripping
  45. nnoremap <Leader>w :w!<CR>
  46. nnoremap <Leader>wq :wq<CR>
  47. nnoremap <Leader>q :q<CR>
  48. nnoremap <Leader>s :FixWhitespace<CR>
  49. nnoremap <Leader>h :noh<CR>
  50. nnoremap <Leader>spell :set spell!<CR>
  51.  
  52. " quickly reformat pararaph
  53. nnoremap <Leader>fft gq
  54. vnoremap <Leader>fft gq
  55.  
  56. " faster deletion of text
  57. " inoremap <Alt><C> <Backspace>
  58.  
  59. " remap arrow keys to learn vim
  60. nnoremap <up> <nop>
  61. nnoremap <down> <nop>
  62. nnoremap <left> <nop>
  63. nnoremap <right> <nop>
  64.  
  65. vnoremap <up> <nop>
  66. vnoremap <down> <nop>
  67. vnoremap <left> <nop>
  68. vnoremap <right> <nop>
  69.  
  70. nnoremap / /\v
  71. vnoremap / /\v
  72.  
  73. " faster scrolling
  74. nnoremap <Space> <C-D>
  75. nnoremap <Backspace> <C-U>
  76.  
  77. " ----------------------------------------------------------------------------
  78. " UI
  79. " ----------------------------------------------------------------------------
  80.  
  81. set showcmd " display incomplete commands
  82. set lazyredraw " turn on lazy redraw
  83. set background=light " I like my terminal dimmm
  84. set number " line numbers
  85. set numberwidth=2 " give me a gutter
  86. set wildmenu " turn on wild menu
  87. set wildmode=list:longest,full
  88. set wildchar=<TAB> " set auto complete to <TAB>
  89. set ch=1 " command line height
  90. set backspace=2 " allow backspacing over everything in insert mode
  91. set shortmess=filtIoOA " shorten messages
  92. set report=0 " tell us about changes
  93. set nostartofline " don't jump to the start of line when scrolling
  94.  
  95. " ----------------------------------------------------------------------------
  96. " Visual Cues
  97. " ----------------------------------------------------------------------------
  98.  
  99. set t_Co=256 " give me all 256 colors
  100. set so=10 " 10 line when moving vertically
  101. set showmatch " brackets/braces that is
  102. set mat=5 " duration to show matching brace (1/10 sec)
  103. set incsearch " do incremental searching
  104. set laststatus=2 " always show the status line
  105. set hlsearch " highlight searches
  106. set incsearch " incremental search on
  107. set noerrorbells " shut up
  108. set novisualbell
  109. set gdefault " makes :%s/foo/bar/ -> :%s/foo/bar/g
  110. set colorcolumn=80 " show me a marker at the 80 char line
  111. set ttyfast " be fast
  112. set encoding=utf-8
  113. set spelllang=en_ca " gimme spellcheck!
  114. set cursorline " show me a cursor line
  115. set relativenumber
  116. set foldmethod=manual " lines with the same indentation are folded
  117. " together
  118.  
  119. " ----------------------------------------------------------------------------
  120. " Misc. Options
  121. " ----------------------------------------------------------------------------
  122.  
  123. set autowriteall " automatically save files when moving around
  124. set title " set the title of the window to the file's title
  125.  
  126. "" Preferred highlights
  127. "hi clear SpellBad
  128. "hi clear SpellCap
  129. "hi clear SpellLocal
  130. "hi clear SpellRare
  131. "hi clear StatusLine
  132. "hi clear StatusLineNC
  133. "hi clear ColorColumn
  134. "hi clear LineNr
  135. "hi clear NonText
  136. "hi clear SpecialKey
  137. "hi clear CursorLine
  138. "hi clear CursorColumn
  139. "hi clear Visual
  140. "hi clear Normal
  141. "hi clear Cursor
  142. "
  143. "" 52 = DarkRed
  144. "" 52 = DarkPink
  145. ""
  146. "
  147. "hi Normal ctermfg=none ctermbg=none cterm=none
  148. "hi SpellBad ctermfg=53 ctermbg=none cterm=underline
  149. "hi SpellCap ctermfg=53 ctermbg=none cterm=underline
  150. "hi SpellLocal ctermfg=53 ctermbg=none cterm=underline
  151. "hi SpellRare ctermfg=53 ctermbg=none cterm=underline
  152. "hi StatusLine ctermfg=211 ctermbg=0 cterm=none
  153. "hi StatusLineNC ctermfg=211 ctermbg=234 cterm=none
  154. "hi ColorColumn ctermfg=none ctermbg=234 cterm=none
  155. "hi LineNr ctermfg=224 ctermbg=0 cterm=none
  156. "hi NonText ctermfg=59 ctermbg=none cterm=none
  157. "hi SpecialKey ctermfg=59 ctermbg=none cterm=none
  158. "hi CursorLine ctermfg=none ctermbg=234 cterm=none
  159. "hi CursorColumn ctermfg=none ctermbg=234 cterm=none
  160. "hi Visual ctermfg=0 ctermbg=212 cterm=none
  161. "hi Folded ctermfg=none ctermbg=234 cterm=none
  162. "hi Search ctermfg=214 ctermbg=none cterm=underline
  163. "hi Error ctermfg=124 ctermbg=none cterm=underline
  164. "hi Todo ctermfg=214 ctermbg=none cterm=underline
  165.  
  166. " Syntastic and Statusline
  167. set statusline=%<%f\ %y%m%r
  168. "truncate from the top, file name, file type, modification, RO
  169. set statusline+=\ %{fugitive#statusline()}
  170. "git information
  171. set statusline+=\ %{SyntasticStatuslineFlag()}
  172. "syntax information
  173. set statusline+=%=
  174. "left align the rest
  175. set statusline+=Line\ %4.6l
  176. "current line number
  177. set statusline+=/%-4.6L
  178. "file length
  179. set statusline+=\ Col\ %-4c
  180.  
  181. let g:syntastic_enable_signs=0 "stops those annoying side things
  182. let g:syntastic_quiet_warnings=1 "only show syntax errors
  183.  
  184. augroup file-type-vim
  185. autocmd!
  186. autocmd FileType vim setlocal foldmethod=marker
  187. augroup END
  188.  
  189. augroup file-type-text
  190. autocmd!
  191. augroup END
  192.  
  193. colorscheme molokai
  194. hi clear LineNr
  195. hi clear StatusLine
  196. hi StatusLine ctermbg=Black
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement