3 function __init_vim_rust() {
7 mkdir -p "$HOME/.vim/pack/plugins/start"
8 rm -rf "$HOME/.vim/pack/plugins/start/rust.vim"
9 git clone --depth=1 https://github.com/rust-lang/rust.vim "$HOME/.vim/pack/plugins/start/rust.vim"
11 if [ -f "$HOME/.vimrc" ]; then
13 if ! grep 'source.*rust.vim' -r ~/.vimrc; then
14 mkdir -p ~/.vim/plugins
15 printf '\n" Rust: reasonable defaults from webinstall.dev/vim-rust\n' >> ~/.vimrc
16 printf 'source ~/.vim/plugins/rust.vim\n' >> ~/.vimrc
21 if ! [ -f "$HOME/.vim/plugins/rust.vim" ]; then
22 mkdir -p ~/.vim/plugins
23 WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
24 curl -fsS -o ~/.vim/plugins/rust.vim "$WEBI_HOST/packages/vim-rust/rust.vim"