Closed meribold closed 4 years ago
This considerably cuts down load time. These are the values I previously got on a ThinkPad X220 running Arch Linux with Vim and Neovim, respectively:
102.437 044.233 044.233: sourcing /home/meribold/.vim/pack/meribold/opt/pastery.vim/plugin/pastery.vim 244.743 084.827 084.459: sourcing /home/meribold/.config/nvim/pack/meribold/opt/pastery.vim/plugin/pastery.vim
Now I get these values:
058.102 000.068 000.068: sourcing /home/meribold/.vim/pack/meribold/opt/pastery.vim/plugin/pastery.vim 156.885 001.137 000.816: sourcing /home/meribold/.config/nvim/pack/meribold/opt/pastery.vim/plugin/pastery.vim
Instead of about 40 or 80 milliseconds (depending on whether Vim or Neovim is used), pastery.vim now loads in a millisecond or less.
Note: Vim seems to use Python 2 and Neovim Python 3 on my system.
See https://learnvimscriptthehardway.stevelosh.com/chapters/53.html and :h autoload.
:h autoload
This is some advanced vim-fu, I will review, thanks!
Thank you!
Thank you for Pastery, Stavros :)
This considerably cuts down load time. These are the values I previously got on a ThinkPad X220 running Arch Linux with Vim and Neovim, respectively:
Now I get these values:
Instead of about 40 or 80 milliseconds (depending on whether Vim or Neovim is used), pastery.vim now loads in a millisecond or less.
Note: Vim seems to use Python 2 and Neovim Python 3 on my system.
See https://learnvimscriptthehardway.stevelosh.com/chapters/53.html and
:h autoload
.