# Largely adapted from: https://www.mpscholten.de/nixos/2016/04/11/setting-up-vim-on-nixos.html with import {}; vim_configurable.customize { name = "vim"; vimrcConfig.vam.knownPlugins = pkgs.vimPlugins; vimrcConfig.vam.pluginDictionaries = [ { names = [ "vim-nix" "Solarized" "fugitive" "surround" "elm-vim" "vimtex" #https://github.com/vim-voom/VOoM #https://github.com/ntpeters/vim-better-whitespace #https://github.com/Matt-Deacalion/vim-systemd-syntax #https://github.com/tpope/vim-obsession #https://github.com/petRUShka/vim-opencl ]; } ]; vimrcConfig.customRC = '' " Must have for vim set nocompatible " Display nbsp set listchars=tab:\|\ ,nbsp:ยท set list " Remap ESC on ,, map ,, imap ,, scriptencoding utf-8 " Must be *after* pathogen filetype plugin indent on " Leader let mapleader="," nnoremap a :echo("\ works! It is set to ") " let maplocalleader = "-" " Highlighting syntax enable if has('gui_running') " When gui is running, it pretty much sets its own colors set background=light set guifont=Inconsolata\ 16 else " If we're in a terminal, then we stay default, terminal will choose " which colors it likes. set background=dark endif let g:solarized_termcolors=16 colorscheme solarized " Set line numbering set number " Don't wrap lines, it's ugly set nowrap " Deal with tabs set softtabstop=2 set tabstop=2 " 1 tab = 2 spaces set shiftwidth=2 " Indent with 2 spaces set expandtab " Insert spaces instead of tabs " Set par as default wrapper set formatprg=${par.outPath}/bin/par\ -w80 " Set mouse on set mouse=a " Don't set timeout - this breaks the leader use set notimeout set ttimeout let &colorcolumn=join(range(81,999),",") " vimtex options let g:vimtex_fold_enabled=1 let g:vimtex_fold_manual=1 " nice pluginless stuff set path+=** set wildmenu " Tag generation command! MakeTags !ctags -R . " Less noise in netrw let g:netrw_banner=0 let g:netrw_browse_split=4 let g:netrw_altv=1 let g:netrw_liststyle=3 let g:netrw_list_hide=netrw_gitignore#Hide() let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+' " Normal backspace set backspace=indent,eol,start ''; }