mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +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;
|
let inherit (args.composableDerivation) composableDerivation edf;
|
||||||
nixosRuntimepath = pkgs.writeText "runtimepath.vim" ''
|
nixosRuntimepath = pkgs.writeText "nixos-vimrc" ''
|
||||||
function! NixosPluginPath()
|
function! NixosPluginPath()
|
||||||
let seen = {}
|
let seen = {}
|
||||||
for p in reverse(split($NIX_PROFILES))
|
for p in reverse(split($NIX_PROFILES))
|
||||||
@ -19,6 +19,12 @@ let inherit (args.composableDerivation) composableDerivation edf;
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
execute NixosPluginPath()
|
execute NixosPluginPath()
|
||||||
|
|
||||||
|
if filereadable("/etc/vimrc")
|
||||||
|
source /etc/vimrc
|
||||||
|
elseif filereadable("/etc/vim/vimrc")
|
||||||
|
source /etc/vim/vimrc
|
||||||
|
endif
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
composableDerivation {
|
composableDerivation {
|
||||||
|
Loading…
Reference in New Issue
Block a user