candyapplecorn

.vimrc

Jul 6th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.07 KB | None | 0 0
  1. set nocompatible              " be iMproved, required
  2. filetype off                  " required
  3.  
  4. " set the runtime path to include Vundle and initialize
  5. set rtp+=~/.vim/bundle/Vundle.vim
  6. call vundle#begin()
  7. " alternatively, pass a path where Vundle should install plugins
  8. "call vundle#begin('~/some/path/here')
  9.  
  10. " let Vundle manage Vundle, required
  11. Plugin 'VundleVim/Vundle.vim'
  12.  
  13. " The following are examples of different formats supported.
  14. " Keep Plugin commands between vundle#begin/end.
  15. " plugin on GitHub repo
  16. Plugin 'tpope/vim-fugitive'
  17. " plugin from http://vim-scripts.org/vim/scripts.html
  18. " Plugin 'L9'
  19. " Git plugin not hosted on GitHub
  20. Plugin 'git://git.wincent.com/command-t.git'
  21. " git repos on your local machine (i.e. when working on your own plugin)
  22. " Plugin 'file:///home/gmarik/path/to/plugin'
  23. " The sparkup vim script is in a subdirectory of this repo called vim.
  24. " Pass the path to set the runtimepath properly.
  25. Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
  26. " Avoid a name conflict with L9
  27. " Plugin 'user/L9', {'name': 'newL9'}
  28. " YouCompleteMe
  29. Plugin 'Valloric/YouCompleteMe'
  30. " Syntastic
  31. Plugin 'scrooloose/syntastic'
  32. " Plugin 'bling/vim-airline'
  33. Plugin 'majutsushi/tagbar'
  34. Plugin 'vim-scripts/a.vim'
  35. Plugin 'rdnetto/YCM-Generator'
  36. " typescript syntax hilighting
  37. Plugin 'leafgarland/typescript-vim'
  38. " typescript omni, code completion
  39. Plugin 'Quramy/tsuquyomi'
  40. " This plugin was recommended by tsququyomi - It enables interactive command execution
  41. Plugin 'Shougo/vimproc.vim'
  42. " typescript and vim indentation plugin
  43. Plugin 'jason0x43/vim-js-indent'
  44. " Zen-Coding vim Plugin (for generating html snippets from CSS selectors)
  45. Plugin 'mattn/emmet-vim'
  46. " This is the aggregation of all the various Perl-related syntax and helper files for Perl 5 and Perl 6.
  47. Plugin 'vim-perl/vim-perl'
  48. " Vastly improved Javascript indentation and syntax support in Vim.
  49. Plugin 'pangloss/vim-javascript'
  50. " Vim/Ruby Configuration Files
  51. Plugin 'vim-ruby/vim-ruby'
  52. " endwise.vim: wisely add "end" in ruby, endfunction/endif/more in vim script, etc
  53. Plugin 'tpope/vim-endwise'
  54.  
  55. let g:typescript_compiler_options="--experimentalDecorators"
  56.  
  57.  
  58. " All of your Plugins must be added before the following line
  59. call vundle#end()            " required
  60. filetype plugin indent on    " required
  61. " To ignore plugin indent changes, instead use:
  62. "filetype plugin on
  63. "
  64. " Brief help
  65. " :PluginList       - lists configured plugins
  66. " :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
  67. " :PluginSearch foo - searches for foo; append `!` to refresh local cache
  68. " :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
  69. "
  70. " see :h vundle for more details or wiki for FAQ
  71. " Put your non-Plugin stuff after this line
  72.  
  73. " END OF VUNDLE STUFF
  74. set runtimepath+=~/.vim_runtime
  75.  
  76. " DISABLE THESE
  77. source ~/.vim_runtime/vimrcs/basic.vim
  78. source ~/.vim_runtime/vimrcs/filetypes.vim
  79. source ~/.vim_runtime/vimrcs/plugins_config.vim
  80. source ~/.vim_runtime/vimrcs/extended.vim
  81.  
  82. try
  83. source ~/.vim_runtime/my_configs.vim
  84. catch
  85. endtry
  86.  
  87. set nofoldenable
  88.  
  89. " This will make vim reload its configuration file whenever it changes.
  90. augroup reload_vimrc " {
  91.     autocmd!
  92.     autocmd BufWritePost $MYVIMRC source $MYVIMRC
  93. augroup END " }
  94.  
  95. " Enables HTML/CSS syntax highlighting in your JavaScript file.
  96. let g:javascript_enable_domhtmlcss = 1
  97.  
  98. " enable automatic generation of { / END
  99.  
  100. if !exists( "*RubyEndToken" )
  101.  
  102.  function RubyEndToken()
  103.    let current_line = getline( '.' )
  104.    let braces_at_end = '{\s*\(|\(,\|\s\|\w\)*|\s*\)\?$'
  105.    let stuff_without_do = '^\s*\(class\|if\|unless\|begin\|case\|for\|module\|while\|until\|def\)'
  106.      let with_do = 'do\s*\(|\(,\|\s\|\w\)*|\s*\)\?$'
  107.  
  108.      if match(current_line, braces_at_end) >= 0
  109.        return "\<CR>}\<C-O>O"
  110.      elseif match(current_line, stuff_without_do) >= 0
  111.        return "\<CR>end\<C-O>O"
  112.      elseif match(current_line, with_do) >= 0
  113.        return "\<CR>end\<C-O>O"
  114.      else
  115.        return "\<CR>"
  116.      endif
  117.    endfunction
  118.  
  119. endif
  120.  
  121. imap <buffer> <CR> <C-R>=RubyEndToken()<CR>
Add Comment
Please, Sign In to add comment