-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·37 lines (31 loc) · 894 Bytes
/
install.sh
File metadata and controls
executable file
·37 lines (31 loc) · 894 Bytes
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
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# Symlink current directory to ~/.vim
ln -s "$(pwd)" ~/.vim
# Symlink vimrc file to ~/.vimrc
ln -s "$(pwd)/vimrc" ~/.vimrc
# Download vim-plug
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Install fzf based on the operating system
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS
brew install fzf
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
# Linux
sudo apt-get update
sudo apt-get install -y fzf
else
echo "Unsupported operating system"
exit 1
fi
# Run PlugInstall inside Vim
vim +PlugInstall +qall
# Neovim setup
if command -v nvim &> /dev/null; then
echo "Setting up Neovim..."
mkdir -p ~/.config
ln -s "$(pwd)/nvim" ~/.config/nvim
nvim --headless "+Lazy! sync" +qa
echo "Neovim setup complete."
else
echo "Neovim not found, skipping Neovim setup."
fi