Advertisement
wolkchen

Gentoo .vimrc

Oct 4th, 2023
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 2.30 KB | None | 0 0
  1. " requires:
  2. " app-vim/vimpython
  3. " app-vim/youcompleteme::tatsh-overlay USE="python_single_target=python3_11"
  4. " app-vim/gentoo-syntax
  5. " app-vim/indentpython
  6. " app-vim/rust-vim
  7. " global use flags:
  8. " app-editors/vim python
  9. " app-editors/vim python_single_target_python3_11
  10. "
  11. " Note that a gentoo install cannot use the default vim package manager and
  12. " must instead use portage.
  13. "
  14. " try to install app-vim/vimlatex when it can use the 3_11 single python
  15. " target. currently causes annoying dep conflicts.
  16.  
  17. " colour and theme (user added)                                                
  18. colorscheme sublimemonokai
  19. syntax on
  20. set nu
  21.                                                                                
  22. " enable gentoo syntax (user added)                                            
  23. filetype plugin on                                                              
  24. filetype indent on                                                              
  25.                                                                                
  26. " text wrapping                                                                
  27. set wrap                                                                        
  28. set colorcolumn=80
  29. set formatoptions+=t
  30. au BufRead,BufNewFile *.md setlocal textwidth=79
  31. au BufRead,BufNewFile *.tex setlocal textwidth=79
  32. set linebreak
  33. set mouse=a
  34.  
  35. " Spellcheck
  36. autocmd BufRead,BufNewFile *.md setlocal spell spellang=en_uk
  37. autocmd BufRead,BufNewFile *.tex setlocal spell spellang=en_uk
  38.  
  39. " tree
  40. let g:netrw_liststyle = 3
  41. let g:netrw_banner = 0
  42. let g:netrw_browse_split = 4
  43. let g:netrw_winsize = 15
  44. let g:netrw_altv = 1
  45. augroup ProjectDrawer
  46.   autocmd!
  47.   autocmd VimEnter * :Vexplore
  48. augroup END
  49.  
  50. " indent misc
  51. au BufNewFile,BufRead *.js, *.html, *.css
  52.     \ set tabstop=2
  53.     \ set softtabstop=2
  54.     \ set shiftwidth=2
  55.  
  56. " rust
  57. syntax enable
  58. filetype plugin indent on
  59.  
  60. " python
  61. au BufNewFile,BufRead *.py
  62.     \ set tabstop=4
  63.     \ set softtabstop=4
  64.     \ set shiftwidth=4
  65.     \ set textwidth=79
  66.     \ set expandtab
  67.     \ set autoindent
  68.     \ set fileformat=unix
  69. highlight BadWhitespace ctermbg=red guibg=darkred
  70. au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
  71. set encoding=utf-8
  72. autocmd FileType python set autoindent
  73. set backspace=indent,eol,start
  74.  
  75.  
  76.  
  77.  
Tags: Linux vim gentoo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement