diff options
| -rw-r--r-- | INSTALL.txt | 6 | ||||
| -rwxr-xr-x | scripts/nvim-startup.sh | 12 |
2 files changed, 8 insertions, 10 deletions
diff --git a/INSTALL.txt b/INSTALL.txt index e00793c..142213b 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -40,7 +40,7 @@ $ sudo atsutil databases -remove $ /usr/local/opt/ncurses/bin/infocmp tmux-256color > /var/tmp/tmux-256color.info $ tic -xe tmux-256color /var/tmp/tmux-256color.info -$ nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync' +$ go install github.com/rhysd/vim-startuptime@latest # Restart your machine. ``` @@ -83,7 +83,7 @@ $ sudo adduser $(whoami) docker $ cargo install hgrep $ cargo install alacritty -$ snap install zig --classic --edge +$ go install github.com/rhysd/vim-startuptime@latest -$ nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync' +$ snap install zig --classic --edge ``` diff --git a/scripts/nvim-startup.sh b/scripts/nvim-startup.sh index 1efc93e..bc275ab 100755 --- a/scripts/nvim-startup.sh +++ b/scripts/nvim-startup.sh @@ -1,11 +1,9 @@ #!/bin/bash -if [[ "$1" == '-s' ]]; then - _filter='sort -nr -k2' +if type vim-startuptime >/dev/null 2>&1; then + vim-startuptime -vimpath nvim > ./nvim-startup.log else - _filter='cat' + log="$(mktemp)" + nvim --startuptime "$log" +q + sort -nr -k2 "$log" > ./nvim-startup.log fi - -log="$(mktemp)" -nvim --startuptime "$log" +q -$_filter "$log" > ./nvim-startup.log |
