summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-11-01 13:21:09 +0100
committertv <tv@shackspace.de>2015-11-01 13:21:09 +0100
commit542a78403fe92c7690e985d19195087c10b0252f (patch)
tree4365ac860caa2bde1338838198762ad8620c8fcc
parentfac32d63571d322ee7b73bc06ab69b519e301706 (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 758dd506b..62ed02f74 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" ''