aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2021-11-19 23:27:34 +0900
committernsfisis <nsfisis@gmail.com>2021-11-19 23:27:34 +0900
commit544aca897346feaecab01425993a22a2183bc271 (patch)
tree68552fe5512ea6cf1140d2ba7c7c440b5a6e0687 /scripts
parentb2fb11e1bf06f9d1c33b9a158a7a418602c0bddd (diff)
downloaddotfiles-544aca897346feaecab01425993a22a2183bc271.tar.gz
dotfiles-544aca897346feaecab01425993a22a2183bc271.tar.zst
dotfiles-544aca897346feaecab01425993a22a2183bc271.zip
neovim: add -n flag to scripts/vim-startup.sh
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vim-startup.sh10
1 files changed, 8 insertions, 2 deletions
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