Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install script? #2

Closed
alexxroche opened this issue Sep 26, 2020 · 1 comment · Fixed by #3
Closed

Install script? #2

alexxroche opened this issue Sep 26, 2020 · 1 comment · Fixed by #3

Comments

@alexxroche
Copy link

To make this as accessible as possible, should we have a shell script that can install this, (for those folk that don't have a vim plugin manager?)

#!/bin/sh

if [ "$(which cargo)" ]; then # if rust is installed:

    # install plugin
    mkdir -p ~/.vim/plugin 2>/dev/null
    cd ~/.vim/plugin
    [ -f "minimap.vim" ]||wget https://github.com/wfxr/minimap.vim/raw/master/plugin/minimap.vim
    cd ..

    # install bin
    mkdir -p bin/ 2>/dev/null
    cd bin/
    [ -f "minimap_generator.sh" ]||wget https://raw.githubusercontent.com/wfxr/minimap.vim/master/bin/minimap_generator.sh
    cd ..

    #install autoload
    mkdir -p autoload/minimap/ 2>/dev/null
    cd autoload/minimap
    [ -f "vim.vim" ]||wget https://github.com/wfxr/minimap.vim/raw/master/autoload/minimap/vim.vim
    cd

     # install deps
     cargo install --locked code-minimap
else
    printf "Maybe install rust?: \e[0;33m curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh \033[0m \n"
fi

(Though my proposed install script causes my copy of vim 8.1.1401 to warn:

Error detected while processing /home/alexx/.vim/plugin/minimap.vim:
line   31:
E121: Undefined variable: g:minimap_auto_start

)

@wfxr
Copy link
Owner

wfxr commented Sep 26, 2020

Hi @alexxroche Thanks for your feedback. The Undefined variable bug was fixed by @lambdalisue .
Maintaining a manually install script is a difficult thing. But your script is of great help to others with similar needs. I will put the link of this issue in the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants