3 function __init_vim_mouse() {
7 mkdir -p "$HOME/.vim/plugins"
8 rm -rf "$HOME/.vim/plugins/mouse.vim"
12 if [ ! -e "$HOME/.vimrc" ]; then
16 if ! [ -f "$HOME/.vim/plugins/mouse.vim" ]; then
17 mkdir -p ~/.vim/plugins
18 WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
19 curl -fsS -o ~/.vim/plugins/mouse.vim "$WEBI_HOST/packages/vim-mouse/mouse.vim"
22 if ! grep 'source.*plugins.mouse.vim' -r ~/.vimrc > /dev/null 2> /dev/null; then
24 mkdir -p ~/.vim/plugins
25 printf '\n" Mouse Support: reasonable defaults from webinstall.dev/vim-mouse\n' >> ~/.vimrc
26 printf 'source ~/.vim/plugins/mouse.vim\n' >> ~/.vimrc
28 echo "added ~/.vim/plugins/mouse.vim"
29 echo "updated ~/.vimrc with 'source ~/.vim/plugins/mouse.vim'"
33 echo "vim-mouse enabled with reasonable defaults"