forked from sd65/MiniVim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·26 lines (22 loc) · 674 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
# Backup old .vimrc
if [ -f "$HOME/.vimrc" ]; then
echo "Backup old .vimrc to .vimrc.beforeMiniVim"
mv "$HOME/.vimrc" "$HOME/.vimrc.beforeMiniVim"
fi
# Install
dir="$(cd "$(dirname "$0")" && pwd)"
echo "Creating the .vimrc..."
cp "${dir}/vimrc" "$HOME/.vimrc"
# Set an option in your shell to ignore XOFF and XON signals
# (in order to use Ctrl S and Ctrl Q)
echo "Ignoring XON signals...."
echo "stty -ixon" >> "$HOME/.${SHELL##*/}rc"
# Ready
echo
echo "Installed!"
echo "You need to reload your shell config by running:"
echo " source \"$HOME/.${SHELL##*/}rc\""
echo "Or by opening a new terminal prompt."
echo
echo "Then you're ready to use MiniVim!"