-
Notifications
You must be signed in to change notification settings - Fork 0
/
vim_setup.sh
executable file
·53 lines (45 loc) · 1.5 KB
/
vim_setup.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# Define color codes
RED='\033[1;31m'
GREEN='\033[1;32m'
YELLOW='\033[1;33m'
BLUE='\033[1;34m'
MAGENTA='\033[1;35m'
CYAN='\033[1;36m'
NC='\033[0m' # No color
echo -e "${CYAN}Setting up Vim with the 'OneHalfDark' colorscheme and Lightline plugin...${NC}"
# Install Vim
echo -e "${YELLOW}Installing Vim...${NC}"
pkgman install -y vim
echo -e "${GREEN}Vim installed successfully.${NC}"
# Configure the vimrc file
echo -e "${YELLOW}Configuring vimrc file...${NC}"
mkdir -p $HOME/config/settings/vim/
touch $HOME/config/settings/vim/vimrc
vimrc_path=$HOME/config/settings/vim/vimrc
cat << EOF >> $vimrc_path
set number
set cursorline
set linebreak
set incsearch
set hlsearch
set spell
set smoothscroll
set termguicolors
call plug#begin('~/config/settings/vim/plugged')
Plug 'itchyny/lightline.vim'
Plug 'sonph/onehalf', { 'rtp': 'vim' }
call plug#end()
let g:lightline = {'colorscheme': 'onehalfdark'}
colorscheme onehalfdark
set laststatus=2
set noshowmode
EOF
echo -e "${GREEN}vimrc configured successfully.${NC}"
# Get vim-plug and install the Lightline plugin
echo -e "${YELLOW}Setting up vim-plug and installing Lightline plugin...${NC}"
mkdir -p ~/config/settings/vim/autoload
curl https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -o ~/config/settings/vim/autoload/plug.vim
vim -es -u $vimrc_path -i NONE -c "PlugInstall" -c "qa"
echo -e "${GREEN}Lightline plugin installed successfully.${NC}"
echo -e "${CYAN}Vim setup completed with the 'OneHalfDark' colorscheme and Lightline plugin.${NC}"