Remove submodule and go for install or update script

parent 086603a0
[submodule "pack/yapbreak/start/colorizer"]
path = pack/yapbreak/start/colorizer
url = https://github.com/vim-scripts/colorizer
branch = master
[submodule "pack/yapbreak/start/lightline"]
path = pack/yapbreak/start/lightline
url = https://github.com/itchyny/lightline.vim
branch = master
[submodule "pack/yapbreak/start/fugitive"]
path = pack/yapbreak/start/fugitive
url = https://github.com/tpope/vim-fugitive
branch = master
[submodule "pack/yapbreak/start/youcompleteme"]
path = pack/yapbreak/start/youcompleteme
url = https://github.com/Valloric/YouCompleteMe
branch = master
[submodule "pack/yapbreak/start/ycmgenerator"]
path = pack/yapbreak/start/ycmgenerator
url = https://github.com/rdnetto/YCM-Generator
branch = stable
[submodule "pack/yapbreak/start/nerdtree"]
path = pack/yapbreak/start/nerdtree
url = https://github.com/scrooloose/nerdtree
branch = master
[submodule "pack/yapbreak/start/nerdtreegit"]
path = pack/yapbreak/start/nerdtreegit
url = https://github.com/Xuyuanp/nerdtree-git-plugin
branch = master
[submodule "pack/yapbreak/start/tagbar"]
path = pack/yapbreak/start/tagbar
url = https://github.com/majutsushi/tagbar
branch = master
[submodule "pack/yapbreak/start/easytags"]
path = pack/yapbreak/start/easytags
url = https://github.com/xolox/vim-easytags
branch = master
[submodule "pack/yapbreak/start/misc"]
path = pack/yapbreak/start/misc
url = https://github.com/xolox/vim-misc
branch = master
[submodule "pack/yapbreak/start/cctree"]
path = pack/yapbreak/start/cctree
url = https://github.com/hari-rangarajan/CCTree
branch = master
[submodule "pack/yapbreak/start/ctrlp"]
path = pack/yapbreak/start/ctrlp
url = https://github.com/kien/ctrlp.vim
branch = master
[submodule "pack/yapbreak/start/minibufexpl"]
path = pack/yapbreak/start/minibufexpl
url = https://github.com/fholgado/minibufexpl.vim
branch = master
[submodule "pack/yapbreak/start/qfgrep"]
path = pack/yapbreak/start/qfgrep
url = https://github.com/sk1418/QFGrep.git
branch = master
[submodule "pack/yapbreak/start/grep"]
path = pack/yapbreak/start/grep
url = https://github.com/yegappan/grep.git
branch = master
[submodule "pack/yapbreak/start/syntastic"]
path = pack/yapbreak/start/syntastic
url = https://github.com/vim-syntastic/syntastic.git
branch = master
[submodule "pack/yapbreak/start/ultisnips"]
path = pack/yapbreak/start/ultisnips
url = https://github.com/sirver/UltiSnips
branch = master
[submodule "pack/yapbreak/start/snips"]
path = pack/yapbreak/start/snips
url = https://github.com/honza/vim-snippets
branch = master
[submodule "pack/yapbreak/start/doxygentoolkit"]
path = pack/yapbreak/start/doxygentoolkit
url = https://github.com/vim-scripts/DoxygenToolkit.vim
#
# Makefile that install vim configuration
#
# Configuration can be installed in 2 ways: soft (default) with symbolic link
# and hard where files are copied.
#
# Just run `make soft` or `make hard`.
VIMDIR = .vim
VIMPATH = $(HOME)/$(VIMDIR)
LN = ln -sf
CP = cp -rf
RM = rm -rf
MKDIR = mkdir -p
.PHONY: all soft hard clean help
all: soft
define soft-install
@if [ -e $1 ]; then \
if [ ! -h $1 ]; then \
echo "Hard installation detected ($1)"; \
exit 1; \
fi; \
else \
$(LN) $2 $1; \
fi
endef
define hard-install
@if [ -e $1 ]; then \
if [ -h $1 ]; then \
echo "Soft installation detected ($1)"; \
exit 1; \
else \
$(CP) $2 $1; \
fi; \
else \
$(CP) $2 $1; \
fi
endef
define checkbin
@if ! which $1 > /dev/null 2>&1; then \
echo "$1 not found. $2"; \
exit 1; \
fi
endef
define update-ycm
@(cd $$(find $(VIMPATH)/pack/ -name youcompleteme) && \
git submodule update --init --recursive --remote && \
./install.py --all)
endef
soft: prepare soft-files plugin-soft
hard: prepare hard-files plugin-hard
clean:
$(RM) "$(HOME)/.vimrc"
$(RM) "$(VIMPATH)"
$(RM) "$(HOME)/.viminfo"
help:
@echo "Vim configuration installation:"
@echo ""
@echo " soft: install configuration with symbolic link (default)"
@echo " hard: install configuration by copying files"
@echo " help: show this help"
@echo " plugin: update plugins"
@echo " clean: remove configuration"
binary-check:
@echo -n "Check if all deps are installed..."
$(call checkbin, "cmake", "Install package 'cmake'.")
$(call checkbin, "clang", "Install package 'clang'.")
$(call checkbin, "xbuild", "Install package 'mono'.")
$(call checkbin, "go", "Install package 'go'.")
$(call checkbin, "npm", "Install package 'npm'.")
$(call checkbin, "node", "Install package 'node'.")
$(call checkbin, "tsserver", "Run 'sudo npm install -g typescript'.")
$(call checkbin, "rustc", "Install package 'rust'.")
$(call checkbin, "cargo", "Install package 'cargo'.")
$(call checkbin, "ctags", "Install package 'ctags'.")
$(call checkbin, "shellcheck", "Install package 'shellcheck'.")
@echo " OK"
prepare: binary-check
$(MKDIR) "$(VIMPATH)"
(cd $(HOME) && $(LN) "$(VIMDIR)/vimrc" .vimrc)
soft-files:
$(call soft-install, "$(VIMPATH)/vimrc", "$(PWD)/vimrc")
$(call soft-install, "$(VIMPATH)/config", "$(PWD)/config")
hard-files:
$(call hard-install, "$(VIMPATH)/vimrc", "$(PWD)/vimrc")
-$(MKDIR) "$(VIMPATH)/config"
$(call hard-install, "$(VIMPATH)/config", "$(PWD)/config/"*)
prepare-plugin:
@git submodule init
@git submodule update --recursive --remote
plugin-soft: prepare-plugin
$(call soft-install, "$(VIMPATH)/pack", "$(PWD)/pack")
$(call update-ycm)
@if [[ ! -f /usr/bin/libtinfo.so.5 ]]; then \
sudo $(LN) /usr/lib/libncurses.so /usr/lib/libtinfo.so.5; \
fi
plugin-hard: prepare-plugin
-$(MKDIR) "$(VIMPATH)/pack"
$(call hard-install, "$(VIMPATH)/pack", "$(PWD)/pack/"*)
$(call update-ycm)
@if [[ ! -f /usr/bin/libtinfo.so.5 ]]; then \
sudo $(LN) /usr/lib/libncurses.so /usr/lib/libtinfo.so.5; \
fi
plugin: prepare-plugin
@if [ -h "$(VIMPATH)/vimrc" ]; then \
$(MAKE) plugin-soft; \
else \
$(MAKE) plugin-hard; \
fi
###############################################################################
......@@ -101,7 +101,7 @@ let NERDTreeMapHelp='?'
" Automatically change Vim's current directory when changing NERDTree root.
let NERDTreeChDirMode=2
" List file ignored by NERDTree
let NERDTreeIgnore=['\.git$', '\.svn$', '\.o$[[file]]', '\.d$[[dir]]']
let NERDTreeIgnore=['\.git$', '\.svn$', '\.o$[[file]]', '\.d$[[dir]]', '__pycache__$[[dir]]']
" Respect wildignore settings
let NERDTreeRespectWildIgnore=1
" Bookmark path
......
let g:easytags_cmd = '~/.vim/vim-ctags'
" Enable background tag update
let g:easytags_async = 1
......
#!/bin/bash
CWD="$(dirname "$(readlink -f "$0")")"
echo "Install configuration files"
rsync -av --delete "${CWD}/config/" "${HOME}/.vim/config/"
cp -vf "${CWD}/vimrc" "${HOME}/.vim/vimrc"
cp -vf "${CWD}/vim-ctags" "${HOME}/.vim/vim-ctags"
ln -sf "${HOME}/.vim/vimrc" "${HOME}/.vimrc"
mkdir -p "${HOME}/.vim/pack/yapbreak/start"
PLUGIN_DIR="${HOME}/.vim/pack/yapbreak/start"
function install_or_update_plugin()
{
local git_url
local git_branch
local base_path
git_url="$1"
shift
git_branch="$1"
shift
base_path="$1"
if [ -z "${base_path}" ]; then
base_path="$(basename "${git_url}")"
fi
# Check if repo is already cloned
if [ -d "${PLUGIN_DIR}/${base_path}/.git" ]; then
# Update to top of git_branch
(
cd "${PLUGIN_DIR}/${base_path}" || exit 1
git remote set-url origin "${git_url}"
git fetch --all
git clean -fxd
git checkout -f "origin/${git_branch}"
)
else
# Clone repo and extract the right branch
(
cd "${PLUGIN_DIR}" || exit 1
git clone -b "${git_branch}" "${git_url}" "${base_path}"
)
fi
}
install_or_update_plugin "https://github.com/vim-scripts/colorizer" "master"
install_or_update_plugin "https://github.com/itchyny/lightline.vim" "master"
install_or_update_plugin "https://github.com/tpope/vim-fugitive" "master"
install_or_update_plugin "https://github.com/Valloric/YouCompleteMe" "master"
install_or_update_plugin "https://github.com/rdnetto/YCM-Generator" "stable"
install_or_update_plugin "https://github.com/scrooloose/nerdtree" "master"
install_or_update_plugin "https://github.com/Xuyuanp/nerdtree-git-plugin" "master"
install_or_update_plugin "https://github.com/majutsushi/tagbar" "master"
install_or_update_plugin "https://github.com/xolox/vim-easytags" "master"
install_or_update_plugin "https://github.com/xolox/vim-misc" "master"
install_or_update_plugin "https://github.com/hari-rangarajan/CCTree" "master"
install_or_update_plugin "https://github.com/kien/ctrlp.vim" "master"
install_or_update_plugin "https://github.com/fholgado/minibufexpl.vim" "master"
install_or_update_plugin "https://github.com/sk1418/QFGrep.git" "master"
install_or_update_plugin "https://github.com/yegappan/grep.git" "master"
install_or_update_plugin "https://github.com/vim-syntastic/syntastic.git" "master"
install_or_update_plugin "https://github.com/sirver/UltiSnips" "master"
install_or_update_plugin "https://github.com/honza/vim-snippets" "master"
install_or_update_plugin "https://github.com/vim-scripts/DoxygenToolkit.vim" "master"
install_or_update_plugin "https://github.com/editorconfig/editorconfig-vim" "master"
# Finalize process for YouCompleteMe
(
cd "${PLUGIN_DIR}/YouCompleteMe" || exit 1
git submodule update --init --recursive
./install.py --clang-completer --java-completer
)
Subproject commit 1e1b040d40ea5f33e66e9c65c376372ba06a8ffa
Subproject commit 5fd7d909e5c06f033136bf4e079bf4ebb24d1503
Subproject commit 564176f01d7f3f7f8ab452ff4e1f5314de7b0981
Subproject commit afd8663d36d2ec19d26befdb10e89e912d26bbd3
Subproject commit 72a8753b5d0a951e547c51b13633f680a95b5483
Subproject commit 42daa3183bac29e8f10f5a1c99e38d86efffa864
Subproject commit ac33b4e2e0cde6857d867dfa6a0bfb67692b24f1
Subproject commit 022634035ed1fcfd2dff7974a35d7e894ca796fc
Subproject commit ad72976ca3df4585d49aa296799f14f3b34cf953
Subproject commit 3e6b8fb6f03f13434543ce1f5d24f6a5d3f34f0b
Subproject commit 8a6ae7c6338378b6bb28ad0cf03e71ff0fd11a5a
Subproject commit 6a9b3122cb89b3a45ec444f9787a895125aca8aa
Subproject commit 27d130d3c8a2ae6659495fb3b18336b2d8ea7ac6
Subproject commit 92b03cc855f6e7d70a46ec13cc02dd61730ade57
Subproject commit 08adf11e81baef2f504d766f8c5b7444b2ee5a6f
Subproject commit bef1fa408026e5fb9df1b2ec5d339039098df7c2
Subproject commit 423f264e753cec260b4f14455126e6db7ba429af
Subproject commit 4d92151f0b29afadacdd3a6c90e5a449afc34bb1
Subproject commit 6f8fc4336500212c7c8ae8ae4c59e3208eff0f17
#!/bin/bash
if [ "$1" == "--version" ]; then
/usr/bin/ctags --version | tail -n+3
exit $?
fi
/usr/bin/ctags "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment