-
Notifications
You must be signed in to change notification settings - Fork 0
/
vim.sh
86 lines (76 loc) · 1.63 KB
/
vim.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/env bash
# Create new folder in $HOME/.vim/pack
# create a start folder and cd into it.
#
# Arguments:
# package_group, a string folder name to create and change into.
#
# Examples:
# set_group language
#
function set_group () {
package_group=$1
path="$HOME/.vim/pack/$package_group/start"
mkdir -p "$path"
cd "$path" || exit
}
# Clone or update a git repo in the current directory.
#
# Arguments:
# repo_url, a URL to the git repo.
#
# Examples:
# package https://github.com/tpope/vim-endwise.git
#
function package () {
repo_url=$1
expected_repo=$(basename "$repo_url" .git)
if [ -d "$expected_repo" ]; then
cd "$expected_repo" || exit
result=$(git pull --force)
echo "$expected_repo: $result"
else
echo "$expected_repo: Installing..."
git clone -q "$repo_url"
fi
}
(
set_group language
package https://github.com/scrooloose/syntastic.git &
package https://github.com/elzr/vim-json.git &
package https://github.com/tpope/vim-markdown.git &
wait
) &
(
set_group completion
package https://github.com/shougo/neocomplete.vim.git &
wait
) &
(
set_group colorschemes
package https://github.com/altercation/vim-colors-solarized.git &
wait
) &
(
set_group integrations
package https://github.com/tpope/vim-fugitive.git &
wait
) &
(
set_group interface
package https://github.com/vim-airline/vim-airline.git &
package https://github.com/vim-airline/vim-airline-themes.git &
wait
) &
(
set_group commands
package https://github.com/tpope/vim-surround.git &
wait
) &
(
set_group other
package https://github.com/tpope/vim-sensible.git &
package https://github.com/editorconfig/editorconfig-vim.git &
wait
) &
wait