Guest User

Untitled

a guest
Oct 23rd, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | None | 0 0
  1. set nocompatible
  2.  
  3.  
  4. " Config ignore cases and highlight search
  5. set ignorecase hlsearch
  6.  
  7. " Reload file into buffer when it changes on disk
  8. set autoread
  9.  
  10. " Config tabssize
  11. set tabstop=2 shiftwidth=2 expandtab smarttab
  12.  
  13. " Show line numbers
  14. set number
  15.  
  16. set rtp+=~/.vim/bundle/Vundle.vim
  17. call vundle#begin()
  18.  
  19. Plugin 'VundleVim/Vundle.vim'
  20.  
  21. "Plugin 'tpope/vim-sensible'
  22. Plugin 'pangloss/vim-javascript'
  23. Plugin 'mxw/vim-jsx'
  24. Plugin 'flowtype/vim-flow'
  25. Plugin 'ervandew/supertab'
  26. Plugin 'altercation/vim-colors-solarized'
  27. Plugin 'scrooloose/nerdtree'
  28. Plugin 'ctrlpvim/ctrlp.vim'
  29. Plugin 'vim-airline/vim-airline'
  30. Plugin 'vim-airline/vim-airline-themes'
  31. Plugin 'tpope/vim-fugitive'
  32. Plugin 'apple/swift', { 'rtp': 'utils/vim' }
  33. Plugin 'tjvr/vim-nearley'
  34.  
  35. call vundle#end() " required
  36. " filetype plugin on
  37. filetype plugin on " required
  38. " Enable syntax highlighting
  39. syntax on
  40. " Brief help
  41. " :PluginList - lists configured plugins
  42. " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
  43. " :PluginSearch foo - searches for foo; append `!` to refresh local cache
  44. " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
  45.  
  46. " see :h vundle for more details or wiki for FAQ
  47. " Put your non-Plugin stuff after this line
  48.  
  49. " Set scrolling stuff
  50. set scrolloff=15
  51.  
  52. set cursorline
  53.  
  54. " Use locally installed flow
  55. let local_flow = finddir('node_modules', '.;') . '/.bin/flow'
  56. if matchstr(local_flow, "^\/\\w") == ''
  57. let local_flow = getcwd() . "/" . local_flow
  58. endif
  59. if executable(local_flow)
  60. let g:flow#flowpath = local_flow
  61. endif
  62.  
  63. let g:SuperTabDefaultCompletionType = "<c-x><c-o>"
  64.  
  65. inoremap <expr> <C-Space> pumvisible() \|\| &omnifunc == '' ?
  66. \ "\<lt>C-n>" :
  67. \ "\<lt>C-x>\<lt>C-o><c-r>=pumvisible() ?" .
  68. \ "\"\\<lt>c-n>\\<lt>c-p>\\<lt>c-n>\" :" .
  69. \ "\" \\<lt>bs>\\<lt>C-n>\"\<CR>"
  70. imap <C-@> <C-Space>
  71.  
  72. " Configure javascript syntax hl
  73. let g:javascript_plugin_flow = 1
  74. let g:jsx_ext_required = 0
  75. let g:javascript_conceal_function = "ƒ"
  76. let g:flow#autoclose = 1
  77. " let g:flow#errjmp = 1
  78. " set macligatures
  79. " set guifont=Fira\ Code:h12
  80. set guifont=Meslo\ LG\ M\ DZ\ for\ Powerline:h11
  81. let g:airline_powerline_fonts = 1
  82. let g:airline#extensions#tabline#enabled = 1
  83. set laststatus=2
  84.  
  85. function! AirlineInit()
  86. let g:airline_section_y = airline#section#create(['%{&fileencoding?&fileencoding:&encoding}', ' ', '%{strftime("%I:%M")}'])
  87. endfunction
  88.  
  89. autocmd VimEnter * call AirlineInit()
  90.  
  91. nnoremap <C-S-tab> :tabprevious<CR>
  92. nnoremap <C-tab> :tabnext<CR>
  93. nnoremap <C-t> :tabnew<CR>
  94. inoremap <C-S-tab> <Esc>:tabprevious<CR>i
  95. inoremap <C-tab> <Esc>:tabnext<CR>i
  96. inoremap <C-t> <Esc>:tabnew<CR>
  97.  
  98. set background=dark
  99. colorscheme solarized
  100. let g:solarized_termcolors=256
  101.  
  102. " Configure nerdtree
  103. map <C-b> :NERDTreeToggle<CR>
  104.  
  105. " Configure ctrlp
  106. let g:ctrlp_custom_ignore = {
  107. \ 'dir': 'node_modules$\|\.git$\|build$',
  108. \ }
  109. let g:ctrlp_working_path_mode = ''
  110.  
  111. function! TrisoftReact()
  112. 0r~/.vim/react-header.txt
  113. execute "normal! G"
  114. endfunction
  115.  
  116. if !exists(":Th")
  117. command Th call TrisoftReact()
  118. endif
  119.  
  120.  
  121. function! MakeLatexFiles()
  122. execute "!./compile.sh"
  123. endfunction
  124.  
  125. if !exists(":TexCompile")
  126. command TexCompile call MakeLatexFiles()
  127. endif
Add Comment
Please, Sign In to add comment