Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
configuration
vim
Commits
89505c37
Unverified
Commit
89505c37
authored
Aug 21, 2019
by
Adrien Oliva
Browse files
Remove submodule and go for install or update script
parent
086603a0
Changes
25
Hide whitespace changes
Inline
Side-by-side
.gitmodules
View file @
89505c37
[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
deleted
100644 → 0
View file @
086603a0
#
# 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
###############################################################################
config/92-nerdtree.vim
View file @
89505c37
...
...
@@ -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
...
...
config/94-easytag.vim
View file @
89505c37
let
g:easytags_cmd
=
'~/.vim/vim-ctags'
" Enable background tag update
let
g:easytags_async
=
1
...
...
install.sh
0 → 100755
View file @
89505c37
#!/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
)
cctree
@
1e1b040d
Compare
1e1b040d
...
1e1b040d
Subproject commit 1e1b040d40ea5f33e66e9c65c376372ba06a8ffa
colorizer
@
5fd7d909
Compare
5fd7d909
...
5fd7d909
Subproject commit 5fd7d909e5c06f033136bf4e079bf4ebb24d1503
ctrlp
@
564176f0
Compare
564176f0
...
564176f0
Subproject commit 564176f01d7f3f7f8ab452ff4e1f5314de7b0981
doxygentoolkit
@
afd8663d
Compare
afd8663d
...
afd8663d
Subproject commit afd8663d36d2ec19d26befdb10e89e912d26bbd3
easytags
@
72a8753b
Compare
72a8753b
...
72a8753b
Subproject commit 72a8753b5d0a951e547c51b13633f680a95b5483
fugitive
@
42daa318
Compare
42daa318
...
42daa318
Subproject commit 42daa3183bac29e8f10f5a1c99e38d86efffa864
grep
@
ac33b4e2
Compare
ac33b4e2
...
ac33b4e2
Subproject commit ac33b4e2e0cde6857d867dfa6a0bfb67692b24f1
lightline
@
02263403
Compare
02263403
...
02263403
Subproject commit 022634035ed1fcfd2dff7974a35d7e894ca796fc
minibufexpl
@
ad72976c
Compare
ad72976c
...
ad72976c
Subproject commit ad72976ca3df4585d49aa296799f14f3b34cf953
misc
@
3e6b8fb6
Compare
3e6b8fb6
...
3e6b8fb6
Subproject commit 3e6b8fb6f03f13434543ce1f5d24f6a5d3f34f0b
nerdtree
@
8a6ae7c6
Compare
8a6ae7c6
...
8a6ae7c6
Subproject commit 8a6ae7c6338378b6bb28ad0cf03e71ff0fd11a5a
nerdtreegit
@
6a9b3122
Compare
6a9b3122
...
6a9b3122
Subproject commit 6a9b3122cb89b3a45ec444f9787a895125aca8aa
qfgrep
@
27d130d3
Compare
27d130d3
...
27d130d3
Subproject commit 27d130d3c8a2ae6659495fb3b18336b2d8ea7ac6
snips
@
92b03cc8
Compare
92b03cc8
...
92b03cc8
Subproject commit 92b03cc855f6e7d70a46ec13cc02dd61730ade57
syntastic
@
08adf11e
Compare
08adf11e
...
08adf11e
Subproject commit 08adf11e81baef2f504d766f8c5b7444b2ee5a6f
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment