Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.23 KB | None | 0 0
  1. " vim-plug (https://github.com/junegunn/vim-plug)
  2. " Automatically install vim-plug and run PlugInstall if vim-plug not found
  3.  
  4. if empty(glob('~/.vim/autoload/plug.vim'))
  5. silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
  6. https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  7. autocmd VimEnter * PlugInstall | source $MYVIMRC
  8. endif
  9.  
  10. "*****************************************************************************
  11. "" Plug install packages
  12. "*****************************************************************************
  13.  
  14. " Specify a directory for plugins
  15. call plug#begin('~/.vim/plugged')
  16.  
  17. Plug 'tyrannicaltoucan/vim-quantum' " let g:quantum_black = 1
  18. Plug 'ctrlpvim/ctrlp.vim'
  19. Plug 'scrooloose/nerdtree'
  20. Plug 'Xuyuanp/nerdtree-git-plugin'
  21. Plug 'airblade/vim-gitgutter'
  22. Plug 'bronson/vim-trailing-whitespace'
  23. Plug 'editorconfig/editorconfig-vim'
  24. Plug 'Raimondi/delimitMate'
  25. Plug 'scrooloose/syntastic'
  26. Plug 'Yggdroot/indentLine'
  27. Plug 'tpope/vim-commentary'
  28. Plug 'sheerun/vim-polyglot'
  29. Plug 'valloric/matchtagalways' " doesn't work properly in neovim, cursor jumps about
  30. Plug 'ap/vim-buftabline'
  31. Plug 'ConradIrwin/vim-bracketed-paste'
  32.  
  33. " Initialize plugin system
  34. call plug#end()
  35.  
  36. "*****************************************************************************
  37. "" Visual Settings
  38. "*****************************************************************************
  39.  
  40. set number
  41. set ruler
  42. set nowrap
  43.  
  44. if $TERM_PROGRAM =~ "iTerm"
  45. set termguicolors
  46. endif
  47.  
  48. let &t_8f = "<Esc>[38;2;%lu;%lu;%lum"
  49. let &t_8b = "<Esc>[48;2;%lu;%lu;%lum"
  50.  
  51. let g:quantum_black = 1
  52. colorscheme quantum
  53.  
  54. "*****************************************************************************
  55. "" NERDTree config
  56. "*****************************************************************************
  57.  
  58. let NERDTreeShowHidden = 1
  59. let NERDTreeIgnore=['.git$[[dir]]', '.swp']
  60.  
  61. map <C-n> :NERDTreeToggle<CR>
  62.  
  63. "*****************************************************************************
  64. "" Optimizations
  65. "*****************************************************************************
  66.  
  67. set lazyredraw
  68.  
  69. let g:python_host_skip_check = 1
  70. let g:python3_host_skip_check = 1
  71.  
  72. "*****************************************************************************
  73. "" syntastic
  74. "*****************************************************************************
  75.  
  76. let g:syntastic_always_populate_loc_list = 1
  77. let g:syntastic_auto_loc_list = 1
  78. let g:syntastic_check_on_open = 1
  79. let g:syntastic_check_on_wq = 0
  80.  
  81. "*****************************************************************************
  82. "" yank and cut to osx clipboard
  83. "*****************************************************************************
  84.  
  85. noremap YY "+y<CR>
  86. noremap XX "+x<CR>
  87.  
  88. "*****************************************************************************
  89. "" indent
  90. "*****************************************************************************
  91.  
  92. " tabs
  93. set listchars=tab:˗ ,eol:¬
  94. set list
  95.  
  96. " spaces
  97. let g:indentLine_enabled = 1
  98. let g:indentLine_concealcursor = 0
  99. let g:indentLine_char = '·'
  100. let g:indentLine_faster = 1
  101.  
  102. set tabstop=2
  103. set softtabstop=2
  104. set shiftwidth=2
  105.  
  106. set ai
  107.  
  108. filetype plugin indent on
  109.  
  110. " make < > indents keep selection
  111. vnoremap < <gv
  112. vnoremap > >gv
  113.  
  114. "*****************************************************************************
  115. "" matchtagalways
  116. "*****************************************************************************
  117.  
  118. let g:mta_filetypes = { 'html' : 1, 'xhtml' : 1, 'xml' : 1, 'jinja' : 1, 'php': 1 }
  119.  
  120. "*****************************************************************************
  121. "" ctrlp
  122. "*****************************************************************************
  123.  
  124. set wildignore+=*.o,*.obj,.git,*.rbc,*.pyc,__pycache__
  125. let g:ctrlp_custom_ignore = 'v[/](node_modules|target|dist)|(.(swp|tox|ico|git|hg|svn))$'
  126.  
  127.  
  128.  
  129. "*****************************************************************************
  130. "" buffers
  131. "*****************************************************************************
  132.  
  133. noremap <Tab> :bnext<CR>
  134. noremap <S-Tab> :bprevious<CR>
  135.  
  136. noremap <C-w> :bd<CR>
  137.  
  138. "*****************************************************************************
  139. "" general
  140. "*****************************************************************************
  141.  
  142. set autoread
  143. set backspace=indent,eol,start
  144.  
  145. " :h last-position-jump
  146. au BufReadPost * if line("'"") > 1 && line("'"") <= line("$") | exe "normal! g`"" | endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement