X-Git-Url: https://git.sthu.org/?p=vimconf.git;a=blobdiff_plain;f=install.sh;h=4a5ee5aeeee503b92a308651ad673d55037c2ee2;hp=aca030c47ed1d947a297e4527c3792daf89c003d;hb=a6f5b4dbb1b87a7a39b922a1a725a1706bff9c95;hpb=5a6540e9d77613486a8edd03af3baf36d41f2755 diff --git a/install.sh b/install.sh index aca030c..4a5ee5a 100755 --- a/install.sh +++ b/install.sh @@ -25,18 +25,31 @@ check_py3() check_prog() { if which "$1" > /dev/null; then - echo "$1 found" + echo "$1 found." else echo "$1 not found. Aborting." exit fi } +check_font() +{ + if fc-list | grep -q "$1"; then + echo "Font $1 found." + else + echo "Font $1 not found. Either install it or clear g:enable_plugin_devicons." + exit + fi +} + check_requirements() { - check_vim +python3 check_prog aspell + check_prog curl + check_prog git + check_vim +python3 check_py3 neovim + check_font "Hack NF" } backup() { @@ -54,7 +67,8 @@ install() { backup $HOME/.gvimrc $BACKUPDIR backup $HOME/.config/nvim $BACKUPDIR - echo "Installing files." + echo "" + echo "Installing files..." echo "# Empty" > $HOME/.viminfo ln -s $HOME/.vim/init.vim $HOME/.vimrc ln -s $HOME/.vim/gvimrc $HOME/.gvimrc @@ -63,6 +77,10 @@ install() { echo "" echo "vim-startify may complain about invalid viminfo file. It will" echo "disappear once you opened the first file." + echo "" + echo "Add this line to your shell configuration, e.g., ~/.profile, to" + echo "use vim as man pager:" + echo " export MANPAGER=\"view -c MANPAGER -\"" }