My personal Vim configuration.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

46 行
1.1 KiB

  1. #!/bin/bash
  2. missingCommands=""
  3. npm --version > /dev/null 2>&1
  4. if [ $? -ne 0 ]; then
  5. missingCommands="- npm"
  6. fi
  7. xdg-open --version > /dev/null 2>&1
  8. if [ $? != 0 ]; then
  9. missingCommands="${missingCommands}\n- xdg-utils"
  10. fi
  11. curl --version > /dev/null 2>&1
  12. if [ $? != 0 ]; then
  13. missingCommands="${missingCommands}\n- curl"
  14. fi
  15. if [ "$missingCommands" != "" ]; then
  16. echo -e "You have to install the following commands before installing this extension:\n$missingCommands"
  17. exit 1
  18. fi
  19. which instant-markdown-d > /dev/null 2>&1
  20. if [ "$?" -ne 0 ]; then
  21. echo "This plugin needs you to install the following NPM package: https://www.npmjs.com/package/instant-markdown-d"
  22. echo "Please install it and restart this script to activate this plugin."
  23. exit 1
  24. fi
  25. echo "Activating Markdown support..."
  26. cat ~/.vimrc | sed "s/\" Plugin 'suan\/vim-instant-markdown'/Plugin 'suan\/vim-instant-markdown'/" > ~/.vimrc.tmp
  27. rm ~/.vimrc
  28. mv ~/.vimrc.tmp ~/.vimrc
  29. vim +PluginInstall +qall
  30. echo "Markdown support has been activated!"
  31. echo "If you like this plugin, don't forget to send your ♥ to its author: https://github.com/suan/vim-instant-markdown"