about summary refs log tree commit diff
path: root/vim/@install
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>1970-01-01 03:00:00 +0300
committerAzat Bahawi <azat@bahawi.net>2022-09-20 11:51:54 +0300
commit38bab29776950ac2364ed64195b89887717c33de (patch)
treeedaaf366a55dbe96d268019124536bc504c64e87 /vim/@install
chore: init HEAD master
Diffstat (limited to 'vim/@install')
-rwxr-xr-xvim/@install16
1 files changed, 16 insertions, 0 deletions
diff --git a/vim/@install b/vim/@install
new file mode 100755
index 0000000..acf3500
--- /dev/null
+++ b/vim/@install
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+[ ! -d "${HOME}/.vim" ] && \
+    mkdir -p "${HOME}/.vim"
+
+stow \
+    --target="${HOME}" \
+    --ignore="^@.*" \
+    --verbose \
+    vim
+
+if command -v nvim >/dev/null 2>&1 && [ ! -f "${XDG_CONFIG_HOME}/nvim/init.vim" ]
+then
+    mkdir -p "${XDG_CONFIG_HOME}/nvim"
+    ln -s "${HOME}/.vim/vimrc" "${XDG_CONFIG_HOME}/nvim/init.vim"
+fi

Consider giving Nix/NixOS a try! <3