diff options
author | Paul Colomiets <paul@colomiets.name> | 2014-07-09 22:45:26 +0300 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2014-07-15 14:59:16 +0200 |
commit | 5e99b0553cc7f2cc900b21e1a8f78beb5b65c1d6 (patch) | |
tree | 653f71cf5cee465253188386f01870d570d4fd1c /pkgs/applications | |
parent | abf19df497806892678c1395feae1c9d065cbe24 (diff) |
vim: Implement sourcing /etc/vimrc and /etc/vim/vimrc
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/editors/vim/configurable.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix index bf53b4972c176..511a48a0eed9f 100644 --- a/pkgs/applications/editors/vim/configurable.nix +++ b/pkgs/applications/editors/vim/configurable.nix @@ -4,7 +4,7 @@ args@{pkgs, source ? "default", ...}: with args; let inherit (args.composableDerivation) composableDerivation edf; - nixosRuntimepath = pkgs.writeText "runtimepath.vim" '' + nixosRuntimepath = pkgs.writeText "nixos-vimrc" '' function! NixosPluginPath() let seen = {} for p in reverse(split($NIX_PROFILES)) @@ -19,6 +19,12 @@ let inherit (args.composableDerivation) composableDerivation edf; endfunction execute NixosPluginPath() + + if filereadable("/etc/vimrc") + source /etc/vimrc + elseif filereadable("/etc/vim/vimrc") + source /etc/vim/vimrc + endif ''; in composableDerivation { |