aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rwxr-xr-xscripts/vim-startup.sh10
2 files changed, 9 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index ef83f6f..b26ab83 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
/.config/nvim/plugged/
/.config/emacs
vim-startup.log
+nvim-startup.log
diff --git a/scripts/vim-startup.sh b/scripts/vim-startup.sh
index 05daf0e..036a221 100755
--- a/scripts/vim-startup.sh
+++ b/scripts/vim-startup.sh
@@ -1,5 +1,11 @@
#!/bin/bash
+if [[ "$1" == '-n' ]]; then
+ vim=nvim
+else
+ vim=vim
+fi
+
log="$(mktemp)"
-vim --startuptime "$log" +q
-sort -nr -k2 "$log" | head -n 30 > ./vim-startup.log
+$vim --startuptime "$log" +q
+sort -nr -k2 "$log" | head -n 30 > ./$vim-startup.log