{ pkgs, ... }: let configs = [ ../configs/.vimrc ../configs/plugins.vimrc ]; customRC = with builtins; foldl' (r: f: r + (readFile f)) "" configs; vim-configured = with pkgs; vim-full.customize { name = "vim"; # explicitly replace vim vimrcConfig = { inherit customRC; packages.collection = with vimPlugins; { start = [ YouCompleteMe fzf-vim vim-easymotion vim-sleuth vim-better-whitespace vim-tmux-navigator ]; opt = [ ]; }; }; }; in { programs.vim = { defaultEditor = true; package = vim-configured; }; }