Gentoo installation script
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. " /etc/vimrc
  2. """ Vim-Plug ====================================
  3. if empty(glob('~/.vim/autoload/plug.vim'))
  4. silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
  5. \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  6. autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
  7. endif
  8. call plug#begin('~/.vim/plugged') " Minimalist Vim Plugin Manager
  9. """ Settings ====================================
  10. Plug 'tpope/vim-sensible' " Sensible Defaults
  11. set t_BE= " Disable bracketed paste
  12. set nocompatible " be iMproved, required
  13. set nobackup "
  14. set noswapfile "
  15. set termencoding=utf-8 " UTF8 as default encoding
  16. set encoding=utf-8 " ...
  17. set scrolloff=100
  18. """ Input =======================================
  19. set mouse=a " Enable mouse support
  20. set clipboard=unnamedplus " Share X11 clipboard
  21. let mapleader = ','
  22. "
  23. nnoremap <C-h> <C-w>h
  24. nnoremap <C-j> <C-w>j
  25. nnoremap <C-k> <C-w>k
  26. nnoremap <C-l> <C-w>l
  27. " Fold Mappings
  28. inoremap <leader>z <C-O>za
  29. nnoremap <leader>z za
  30. onoremap <leader>z <C-C>za
  31. vnoremap <leader>z zf
  32. " Use <leader>/ to clear search highlight
  33. nmap <silent> <leader>/ :nohlsearch<CR>
  34. "
  35. set pastetoggle=<F2>
  36. set listchars=tab:\|.,trail:.,extends:#,nbsp:.
  37. " Write target file as sudo using 'tee' buffer
  38. function SudoWrite()
  39. w !sudo tee %
  40. endfunction
  41. """ Display =====================================
  42. Plug 'vim-airline/vim-airline'
  43. Plug 'vim-airline/vim-airline-themes'
  44. let g:airline#extensions#tabline#enabled = 1
  45. Plug 'edkolev/tmuxline.vim'
  46. let g:tmuxline_powerline_separators = 0
  47. if has('gui_running')
  48. colorscheme slate
  49. set guifont=Noto\ Mono\ Regular\ 10
  50. set background=dark
  51. set guioptions-=m "remove menu bar
  52. set guioptions-=T "remove toolbar
  53. set guioptions-=r "remove right-hand scroll bar
  54. set guioptions-=L "remove left-hand scroll bar
  55. endif
  56. """ Utilities ===================================
  57. Plug 'spolu/dwm.vim' " Tiled Window Management
  58. Plug 'Shougo/vimfiler.vim' " Powerful file explorer
  59. Plug 'tpope/vim-eunuch' " Helpers for UNIX
  60. Plug 'tpope/vim-dispatch' " Async Build/Test
  61. Plug 'benmills/vimux' " tmux Integration
  62. Plug 'mileszs/ack.vim' " Enhanced Grepping within Vim
  63. if executable('ag')
  64. let g:ackprg = 'ag --vimgrep'
  65. endif
  66. Plug 'ctrlpvim/ctrlp.vim' " Fuzzy file/buffer/mru/tag/etc finder
  67. let g:ctrlp_map = '<c-p>'
  68. let g:ctrlp_cmd = 'CtrlP'
  69. let g:ctrlp_custom_ignore = {
  70. \ 'dir': '\v[\/]\.(git|hg|svn)$',
  71. \ 'file': '\v\.(exe|so|dll)$',
  72. \ 'link': 'some_bad_symbolic_links',
  73. \ }
  74. let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard']
  75. Plug 'universal-ctags/ctags' " ctags implementation
  76. Plug 'majutsushi/tagbar' " Displays tags in a window
  77. nmap <F8> :TagbarToggle<CR>
  78. Plug 'francoiscabrol/ranger.vim'
  79. """ Languages ===================================
  80. Plug 'sheerun/vim-polyglot' " Language Support
  81. Plug 'scrooloose/syntastic' " Syntax checking hacks for vim
  82. nmap <leader>c :SyntasticCheck<CR>
  83. set statusline+=%#warningmsg#
  84. set statusline+=%{SyntasticStatuslineFlag()}
  85. set statusline+=%*
  86. let g:syntastic_always_populate_loc_list = 1
  87. let g:syntastic_auto_loc_list = 1
  88. let g:syntastic_check_on_open = 1
  89. let g:syntastic_check_on_wq = 0
  90. let g:syntastic_error_symbol="S>"
  91. let g:syntastic_style_error_symbol="E>"
  92. let g:syntastic_warning_symbol="W>"
  93. let g:syntastic_style_warning_symbol="W>"
  94. Plug 'fatih/vim-go' " Go development plugin for Vim
  95. let g:go_auto_type_info = 1
  96. let g:go_highlight_functions = 1
  97. let g:go_highlight_methods = 1
  98. let g:go_highlight_structs = 1
  99. let g:go_highlight_interfaces = 1
  100. let g:go_highlight_operators = 1
  101. let g:go_highlight_build_constraints = 1
  102. let g:go_highlight_extra_types = 1
  103. """ Editor ======================================
  104. set tabstop=4 " Tabs are 4 columns
  105. set shiftwidth=4 " ...
  106. set softtabstop=4 " ...
  107. set expandtab " Change tabs to spaces
  108. set list " Show whitespace
  109. set number " Show line numbers
  110. set wrap linebreak nolist
  111. autocmd BufWritePre * %s/\s\+$//e " Delete trailing whitespace on save
  112. Plug 'tpope/vim-sleuth' " Heuristically set buffer options
  113. Plug 'nathanaelkane/vim-indent-guides' " Visaully display indent level
  114. Plug 'junegunn/vim-easy-align' " Easier text alignment
  115. xmap ga <Plug>(EasyAlign)
  116. nmap ga <Plug>(EasyAlign)
  117. Plug 'ervandew/supertab' " Vim insert mode completions with Tab
  118. Plug 'tpope/vim-surround' " Quoting/Parenthesizing made simple
  119. Plug 'junegunn/limelight.vim' " Hyperfocus-writing in Vim
  120. """ Version Control System ======================
  121. Plug 'airblade/vim-gitgutter' " Show git diff in the gutter
  122. nmap <Leader>ha <Plug>GitGutterStageHunk
  123. nmap <Leader>hr <Plug>GitGutterUndoHunk
  124. Plug 'tpope/vim-fugitive' " Git wrapper
  125. Plug 'tpope/vim-git' " Git integration
  126. Plug 'mattn/gist-vim' " Gist upload (GitHub)
  127. call plug#end()