Guest User

Untitled

a guest
Jan 17th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 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. " Plugins
  14. Plugin 'storyn26383/vim-vue'
  15. Plugin 'scrooloose/nerdtree'
  16. Plugin 'scrooloose/syntastic'
  17. Plugin 'scrooloose/nerdcommenter'
  18. Plugin 'tpope/vim-surround'
  19. Plugin 'airblade/vim-gitgutter'
  20. Plugin 'bling/vim-airline'
  21. Plugin 'vim-airline/vim-airline-themes'
  22. Plugin 'zhaocai/goldenview.vim'
  23. Plugin 'mattn/webapi-vim'
  24. Plugin 'mattn/gist-vim'
  25. Plugin 'pangloss/vim-javascript'
  26. Plugin 'ctrlpvim/ctrlp.vim'
  27. Plugin 'rking/ag.vim'
  28. Plugin 'altercation/vim-colors-solarized'
  29. Plugin 'tomasr/molokai'
  30. Plugin 'MarcWeber/vim-addon-mw-utils'
  31. Plugin 'tomtom/tlib_vim'
  32. Plugin 'garbas/vim-snipmate'
  33. Plugin 'isRuslan/vim-es6'
  34. Plugin 'jiangmiao/auto-pairs'
  35. Plugin 'shougo/deoplete.nvim'
  36. Plugin 'dkprice/vim-easygrep'
  37. Plugin 'mxw/vim-jsx'
  38. Plugin 'tpope/vim-repeat'
  39. Plugin 'svermeulen/vim-easyclip'
  40. Plugin 'ryanoasis/vim-devicons'
  41. Plugin 'tpope/vim-fugitive'
  42. Plugin 'leafgarland/typescript-vim'
  43. Plugin 'mattn/emmet-vim'
  44. Plugin 'iamcco/markdown-preview.vim'
  45. Plugin 'carlitux/deoplete-ternjs'
  46. Plugin 'prettier/vim-prettier'
  47.  
  48. call vundle#end() " required
  49. filetype plugin indent on " required
  50.  
  51. "let g:python_host_prog = '/path/to/python2.7r/local/cellar/python3/3.5.2_1'
  52. let g:deoplete#enable_at_startup = 1
  53.  
  54. let mapleader = ","
  55.  
  56. map <Leader>n :NERDTreeToggle <Esc>
  57. map <Leader>s :call ToggleScheme() <Esc>
  58. map <Leader>e :edit <Esc>
  59. map <Leader>p :CtrlP <Esc>
  60. map <Leader>a :Ag <Space>
  61. map <Leader>j :call FormatJson() <Esc>
  62. map <Leader>u :noh <Esc>
  63. map <Leader>w :w <Esc>
  64.  
  65. map <M-BS> :nohls<CR>
  66. map <C-h> <C-w>h
  67. map <C-j> <C-w>j
  68. map <C-k> <C-w>k
  69. map <C-l> <C-w>l
  70. inoremap jj <ESC>
  71. inoremap jk <ESC>
  72. inoremap fd <ESC>
  73. imap cll console.log()<Esc>==f(a
  74.  
  75. " Set GUI customizations
  76. syntax on
  77. set nowrap
  78. set tabstop=2
  79. set shiftwidth=2
  80. set expandtab
  81. set guioptions-=L
  82. set guioptions-=r
  83. set guifont=Hack\ Regular
  84. "set clipboard+=unnamedplus
  85. set notermguicolors
  86.  
  87. " Ctrlp
  88. set wildignore+=*/node_modules/*
  89.  
  90. " Markdown preview
  91. let vim_markdown_preview_hotkey='<C-m>'
  92.  
  93. " React for js ext
  94. let g:jsx_ext_required = 0
  95.  
  96. " Easyclip
  97. let g:EasyClipShareYanks = 1
  98. let g:EasyClipAutoFormat = 1
  99. let g:EasyClipUsePasteToggleDefaults = 0
  100. nmap <c-f> <plug>EasyClipSwapPasteForward
  101. nmap <c-F> <plug>EasyClipSwapPasteBackwards
  102.  
  103. " Vim airline
  104. let g:airline#extensions#tabline#enabled = 1
  105. let g:airline#extensions#branch#enabled = 1
  106. let g:airline_powerline_fonts = 1
  107.  
  108. " JS syntax tweaks
  109. let javascript_enable_domhtmlcss = 1
  110.  
  111. " Prettier
  112. let g:prettier#config#print_width = 65
  113. let g:prettier#config#bracket_spacing = 'true'
  114. let g:prettier#config#semi = 'false'
  115. let g:prettier#config#single_quote = 'true'
  116. let g:prettier#config#trailing_comma = 'none'
  117. let g:prettier#autoformat = 0
  118. autocmd BufWritePre *.js,*.jsx,*.mjs,*.vue,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html PrettierAsync
  119.  
  120. " Launch colorscheme based on time of day
  121. if strftime("%H") >= 7 && strftime("%H") < 17
  122. let g:solarized_termcolors=256
  123. syntax enable
  124. colorscheme solarized
  125. set background=dark
  126. let g:airline_theme='badwolf'
  127. else
  128. colorscheme molokai
  129. let g:airline_theme='simple'
  130. endif
  131.  
  132. " Toggle colorscheme
  133. fu! ToggleScheme()
  134. if g:colors_name == 'molokai'
  135. let g:solarized_termcolors=256
  136. syntax enable
  137. colorscheme solarized
  138. set background=dark
  139. "let g:airline_theme='badwolf'
  140. else
  141. colorscheme molokai
  142. "let g:airline_theme='simple'
  143. endif
  144. endfunction
  145.  
  146. " Format json
  147. fu! FormatJson()
  148. execute '%!python -m json.tool' | w
  149. endfunction
Add Comment
Please, Sign In to add comment