Advertisement
Guest User

vim configuration in configuration.nix

a guest
Sep 8th, 2020
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. nixpkgs.config.packageOverrides = pkgs: rec {
  2. my-vim = pkgs.vim_configurable.customize {
  3. name = "vim"; # the vim binary name
  4. vimrcConfig.customRC = ''
  5. "
  6. set nocompatible " Use Vim defaults (much better!)
  7. set bs=2 " Allow backspacing over everything in insert mode
  8. set ai " Always set auto-indenting on
  9. set history=50 " keep 50 lines of command history
  10. set ruler " Show the cursor position all the time
  11. set viminfo='20,\"500 " Keep a .viminfo file
  12. map Q gq " Don't use Ex mode, use Q for formatting
  13. set numberwidth=3
  14. set nomodeline
  15. set laststatus=2
  16. set hidden
  17. "" set colorcolumn=80
  18. set ignorecase
  19. set smartcase
  20. set incsearch
  21. set hlsearch
  22. set expandtab
  23. set tabstop=3
  24. set shiftwidth=3
  25. autocmd FileType make setlocal noexpandtab
  26. autocmd FileType python set tabstop=4|set shiftwidth=4|set expandtab
  27. autocmd FileType haskell set tabstop=4|set shiftwidth=4|set expandtab
  28. set wildmode=longest,list,full
  29. autocmd FileType mail :nmap <F8> :w<CR>:!aspell -e -c %<CR>:e<CR>
  30. filetype plugin on
  31. filetype indent on
  32. runtime ftplugin/man.vim
  33. set printfont=Monospace\ 10
  34. map ,e :e <C-R>=expand("%:p:h") . "/" <CR>
  35. map ,sp :sp <C-R>=expand("%:p:h") . "/" <CR>
  36. map <F11> :let &background = ( &background == "dark" ? "light" : "dark" )<CR>
  37. set guifont=Monospace\ 14
  38. set background=dark
  39. syntax on
  40.  
  41. let g:airline_powerline_fonts = 1
  42.  
  43. color gruvbox
  44. let g:gruvbox_contrast_dark='hard'
  45. let g:gruvbox_contrast_light='hard'
  46.  
  47. " color dracula
  48. " let g:airline_theme='dracula'
  49. '';
  50. vimrcConfig.vam.knownPlugins = pkgs.vimPlugins;
  51. vimrcConfig.vam.pluginDictionaries = [
  52. { name = "vim-airline"; }
  53. { name = "vim-airline-themes"; }
  54. { name = "vim-colors-solarized"; }
  55. { name = "vim-fugitive"; }
  56. { name = "vim"; } # dracula theme
  57. { name = "gruvbox"; }
  58. ];
  59. };
  60. my-emacs = pkgs.emacsWithPackages (epkgs: with epkgs; [
  61. #magit
  62. ]);
  63. };
  64.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement