summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2015-11-01 13:21:09 +0100
committertv <tv@krebsco.de>2015-11-01 13:21:09 +0100
commitf33c599be171b2967979bec43f5c5de81aed704f (patch)
tree9fe1485d1d1f6f3248c5ded0eef382e04e130584
parentdb68135e85de9aa37bc10e080e9519d27c167672 (diff)
tv vim: so vimrc via VIMINIT
-rw-r--r--tv/2configs/vim.nix11
1 files changed, 6 insertions, 5 deletions
diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix
index 758dd50..62ed02f 100644
--- a/tv/2configs/vim.nix
+++ b/tv/2configs/vim.nix
@@ -66,11 +66,12 @@ let
vim' = pkgs.writeScriptBin "vim" ''
#! /bin/sh
- set -eu
- mkdir -p "$HOME"/.vim/backup
- mkdir -p "$HOME"/.vim/cache
- mkdir -p "$HOME"/.vim/undo
- exec ${pkgs.vim}/bin/vim -u ${vimrc} "$@"
+ set -efu
+ ${pkgs.coreutils}/bin/mkdir -p "$HOME"/.vim/backup
+ ${pkgs.coreutils}/bin/mkdir -p "$HOME"/.vim/cache
+ ${pkgs.coreutils}/bin/mkdir -p "$HOME"/.vim/undo
+ export VIMINIT; VIMINIT=':so ${vimrc}'
+ exec ${pkgs.vim}/bin/vim "$@"
'';
vimrc = pkgs.writeText "vimrc" ''