The ultimate Vim configuration: vimrc
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB

2 years ago
2 years ago
  1. #!/bin/bash
  2. set -e
  3. echo 'Installing Awesome Vim from '$1
  4. cd $1
  5. VIMRC="\" DO NOT EDIT THIS FILE
  6. \" Add your own customizations in $1/my_configs.vim
  7. set runtimepath+=$1
  8. source $1/vimrcs/basic.vim
  9. source $1/vimrcs/filetypes.vim
  10. source $1/vimrcs/plugins_config.vim
  11. source $1/vimrcs/extended.vim
  12. try
  13. source $1/my_configs.vim
  14. catch
  15. endtry"
  16. if [ "$2" = "--all" ]; then
  17. USERS=$(ls -l /home | awk '{if(NR>1)print $9}')
  18. for user in $USERS; do
  19. homepath=$(eval echo "~$user")
  20. IFS=''
  21. echo $VIMRC > ${homepath}/.vimrc
  22. unset IFS
  23. echo "Installed the Ultimate Vim configuration for user $user successfully! Enjoy :-)"
  24. done
  25. echo "Installed the Ultimate Vim configuration successfully! Enjoy :-)"
  26. exit 0
  27. else
  28. SELECTED_USERS=${@:2}
  29. echo "Selected users: $SELECTED_USERS"
  30. for user in $SELECTED_USERS; do
  31. homepath=$(eval echo "~$user")
  32. IFS=''
  33. echo $VIMRC > ${homepath}/.vimrc
  34. unset IFS
  35. echo "Installed the Ultimate Vim configuration for user $user successfully! Enjoy :-)"
  36. done
  37. exit 0
  38. fi