Skip to content

Instantly share code, notes, and snippets.

@tokudan
Created May 22, 2017 20:02
Show Gist options
  • Save tokudan/47121d2cf8bc96b05b95fce78a30c87e to your computer and use it in GitHub Desktop.
Save tokudan/47121d2cf8bc96b05b95fce78a30c87e to your computer and use it in GitHub Desktop.
...
environment.variables.EDITOR = "${pkgs.vim_configurable.out}/bin/vim";
environment.systemPackages = with pkgs; [
...
(import pkgs/vim.nix)
...
];
...
with import <nixpkgs> {};
vim_configurable.customize {
# Specifies the vim binary name.
# E.g. set this to "my-vim" and you need to type "my-vim" to open this vim
# This allows to have multiple vim packages installed (e.g. with a different set of plugins)
name = "vim";
vimrcConfig.customRC = ''
set nu ai tabstop=4
'';
vimrcConfig.vam.knownPlugins = pkgs.vimPlugins;
vimrcConfig.vam.pluginDictionaries = [
{ names = [
# Here you can place all your vim plugins
# They are installed managed by `vam` (a vim plugin manager)
"Syntastic"
"rust-vim"
"vim-racer"
"vim-addon-nix"
]; }
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment