mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
vim: Implement sourcing /etc/vimrc and /etc/vim/vimrc
This commit is contained in:
parent
abf19df497
commit
5e99b0553c
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue