Guest User

Untitled

a guest
Sep 20th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | None | 0 0
  1. " ------
  2. " Vundle
  3. " ------
  4.  
  5. set nocompatible " be iMproved
  6. filetype off " required!
  7.  
  8. set rtp+=~/.vim/bundle/vundle/
  9. call vundle#rc()
  10.  
  11. " let Vundle manage Vundle, required
  12. Bundle 'gmarik/vundle'
  13.  
  14. " Navigation
  15. Bundle 'mutewinter/bufpos'
  16. Bundle 'vim-scripts/ZoomWin'
  17. Bundle 'wincent/Command-T'
  18. Bundle 'Lokaltog/vim-easymotion'
  19. " UI Additions
  20. Bundle 'mutewinter/vim-indent-guides'
  21. Bundle 'dickeytk/status.vim'
  22. Bundle 'scrooloose/nerdtree'
  23. Bundle 'godlygeek/csapprox'
  24. " Commands
  25. Bundle 'scrooloose/nerdcommenter'
  26. Bundle 'tpope/vim-surround'
  27. Bundle 'tpope/vim-fugitive'
  28. Bundle 'godlygeek/tabular'
  29. Bundle 'mileszs/ack.vim'
  30. " Automatic Helpers
  31. Bundle 'IndexedSearch'
  32. Bundle 'xolox/vim-session'
  33. Bundle 'Raimondi/delimitMate'
  34. Bundle 'scrooloose/syntastic'
  35. Bundle 'ervandew/supertab'
  36. Bundle 'vim-scripts/AutoComplPop'
  37. " Language Additions
  38. Bundle 'vim-ruby/vim-ruby'
  39. Bundle 'msanders/cocoa.vim'
  40. Bundle 'tpope/vim-haml'
  41. Bundle 'tpope/vim-endwise'
  42. Bundle 'tpope/vim-rake'
  43. Bundle 'tpope/vim-rvm'
  44. Bundle 'pangloss/vim-javascript'
  45. Bundle 'kchmck/vim-coffee-script'
  46. Bundle 'itspriddle/vim-jquery'
  47. Bundle 'tpope/vim-rails'
  48. Bundle 'leshill/vim-json'
  49. " Libraries
  50. Bundle 'L9'
  51. Bundle 'tpope/vim-repeat'
  52.  
  53. " Automatically detect file types. (must turn on after Vundle)
  54. filetype plugin indent on
  55.  
  56. nmap <Leader>bi :BundleInstall<CR>
  57. nmap <Leader>bi! :BundleInstall!<CR>
  58. nmap <Leader>bu :BundleInstall!<CR> " Because this also updates
  59. nmap <Leader>bc :BundleClean<CR>
  60.  
  61.  
  62. " -------
  63. " Editing
  64. " -------
  65.  
  66. set encoding=utf-8
  67. set mouse=a
  68. set ruler
  69. set number
  70. set tabstop=2
  71. set shiftwidth=2
  72. set softtabstop=2
  73. set smarttab
  74. set expandtab
  75. set cursorline
  76.  
  77. " Search
  78. set hlsearch " highlight search
  79. set incsearch " incremental search, search as you type
  80. set ignorecase " Ignore case when searching
  81. set smartcase " Ignore case when searching lowercase
  82.  
  83. " Visual
  84. set showmatch " Show matching brackets.
  85. set matchtime=5 " Bracket blinking.
  86. set novisualbell " No blinking
  87. set noerrorbells " No noise.
  88.  
  89. " Folds
  90. set foldenable " Turn on folding
  91. set foldmethod=marker " Fold on the marker
  92. set foldlevel=100 " Don't autofold anything (but I can still fold manually)
  93. set foldopen=block,hor,mark,percent,quickfix,tag " what movements open folds
  94. let mapleader = ","
  95.  
  96. " Textmate scheme colors clone
  97. colorscheme molokai
  98.  
  99. " Paste from X clipboard to vim
  100. vnoremap <C-C> "+y
  101. noremap <C-V> <ESC>"+gP
  102. inoremap <C-V> <ESC>"+gPi
  103.  
  104. syntax on
  105.  
  106.  
  107. " -------
  108. " Windows
  109. " -------
  110.  
  111. " resize horzontal split window
  112. nmap <C-Up> <C-W>-<C-W>-
  113. nmap <C-Down> <C-W>+<C-W>+
  114.  
  115. " resize vertical split window
  116. nmap <C-Left> <C-W>><C-W>>
  117. nmap <C-Right> <C-W><<C-W><
  118.  
  119. map <F2> :NERDTreeToggle<CR>
  120.  
  121.  
  122. " ---------------
  123. " Omni Completion
  124. " ---------------
  125.  
  126. if has('autocmd')
  127. autocmd FileType html :set omnifunc=htmlcomplete#CompleteTags
  128. autocmd FileType python set omnifunc=pythoncomplete#Complete
  129. autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
  130. autocmd FileType css set omnifunc=csscomplete#CompleteCSS
  131. autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
  132. autocmd FileType php set omnifunc=phpcomplete#CompletePHP
  133. autocmd FileType c set omnifunc=ccomplete#Complete
  134. autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete " may require ruby compiled in
  135. autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
  136. autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
  137. autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
  138. endif
  139.  
  140. " Improve colors in auto-complete menu
  141. highlight Pmenu ctermbg=238 gui=bold
  142.  
  143.  
  144. " ------
  145. " Generic
  146. " -------
  147.  
  148. " Default browser
  149. command -bar -nargs=1 OpenURL :!firefox <args> & 2> /dev/null
Add Comment
Please, Sign In to add comment