diff options
author | Oxbian <oxbian@mailbox.org> | 2025-09-07 11:34:11 +0200 |
---|---|---|
committer | Oxbian <oxbian@mailbox.org> | 2025-09-07 11:34:11 +0200 |
commit | f05d2056c1827fa520658b2244bf4c0991b6f7d7 (patch) | |
tree | b33419b6d9d8d12d2bf8d1678c079d8f1c50d0f4 | |
parent | a92789e8707d2a077bc6d3fedfcdf377bc6ceba1 (diff) | |
download | vimrc-f05d2056c1827fa520658b2244bf4c0991b6f7d7.tar.gz vimrc-f05d2056c1827fa520658b2244bf4c0991b6f7d7.zip |
-rw-r--r-- | README.md | 7 | ||||
-rwxr-xr-x | install.sh | 27 |
2 files changed, 22 insertions, 12 deletions
@@ -19,6 +19,13 @@ the install.sh script and clone the config inside ~/.vim** git clone https://git.arka.rocks/vimrc.git ~/.vim ``` +*If you want to run the install script which will sed ~/.config/vim to ~/.vim +withtout copying the data into ~/.vim, you can run it with any argument you +want.* +```sh +./install.sh any_argument_you_want +``` + ## Plugins This config has just the necessary plugins installed: @@ -1,7 +1,7 @@ #!/usr/bin/env sh # POSIX script for setting up VIM -set -euo pipefail +set -eux # Variables script_name="$(basename "${0}")" @@ -25,17 +25,20 @@ clean_exit() { trap clean_exit EXIT -# Ask if user want to copy the project in ~/.vim -printf "${title}Do you want to copy VIM config in ~/.vim ? [N/y]${reset}\n" -read -r choice -case "$choice" in - y|Y) - cp -r . ~/.vim - printf "${green}%s${reset}\n" "VIM config copied in ~/.vim" - ;; - *) - ;; -esac +# Ask if user want to copy the project in ~/.vim, can be skipped by adding +# ./install.sh any_argument_you_want +if [ "$#" -eq 0 ]; then + printf "${title}Do you want to copy VIM config in ~/.vim ? [N/y]${reset}\n" + read -r choice + case "$choice" in + y|Y) + cp -r . ~/.vim + printf "${green}%s${reset}\n" "VIM config copied in ~/.vim" + ;; + *) + ;; + esac +fi sed -i s#\.config\/vim#\.vim## ~/.vim/conf/plugins.vim sed -i s#\.config\/vim#\.vim## ~/.vim/vimrc |