Tallboy
Tallboy

Reputation: 13467

make a bin lazy load in macvim

Im using oh-my-zsh with the zsh-nvm plugin.

The huge benefit is if I set NVM_LAZY_LOAD=true, it wont take 1 second to load node/nvm in my terminal every time I make a new terminal tab. Instead it loads lazily if I type a certain command, which I must add to a list of:

.zshrc

export NVM_LAZY_LOAD_EXTRA_COMMANDS=('create-vue' 'eslint' 'v' 'wrangler' 'yarn')

The code for it is here:

https://github.com/lukechilds/zsh-nvm/blob/23067bd9bb6eb6f4737a3ea90cb0cb5e85f61ba2/zsh-nvm.plugin.zsh#L80

I have a custom script v to start MacVim (vim for osx) from the current . folder that my terminal is viewing.

.zsh/bin/v

#!/bin/bash

exec mvim "$@" > /dev/null 2>&1

exit $?

Question: This might be a stretch, but is there a way I can defer the lazy loading INTO macvim's access of zsh shell (when eslint runs inside macvim first time)? So that inside vim that is when it would lazy load the first time I run the command (that way every time I start vim it doesnt take like 1 second now before it opens)

Upvotes: 0

Views: 113

Answers (0)

Related Questions