support: alpine(ycm start)
This commit is contained in:
parent
f08e4bae54
commit
0d35cc41e8
@ -28,6 +28,8 @@ An automatic configuration program for vim
|
||||
cd ~/.vimplus
|
||||
./install.sh
|
||||
|
||||
注: apline用户请预先安装git,bash: apk add git bash
|
||||
|
||||
#### 设置Nerd Font
|
||||
|
||||
为防止vimplus显示乱码,需设置mac终端字体为`Droid Sans Mono Nerd Font`。
|
||||
@ -63,6 +65,7 @@ An automatic configuration program for vim
|
||||
<td><a href="https://distrowatch.com/table.php?distribution=parrot"><img src="https://distrowatch.com/images/yvzhuwbpy/parrot.png"/></a><p align="center"></p></td>
|
||||
<td><a href="https://distrowatch.com/table.php?distribution=raspios"><img src="https://distrowatch.com/images/yvzhuwbpy/raspios.png"/></a><p align="center"></p></td>
|
||||
<td><a href="https://distrowatch.com/table.php?distribution=freebsd"><img src="https://distrowatch.com/images/yvzhuwbpy/freebsd.png"/></a><p align="center"></p></td>
|
||||
<td><a href="https://distrowatch.com/table.php?distribution=alpine"><img src="https://distrowatch.com/images/yvzhuwbpy/alpine.png"/></a><p align="center"></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
55
install.sh
55
install.sh
@ -174,26 +174,12 @@ function is_macos1014()
|
||||
fi
|
||||
}
|
||||
|
||||
# 在alpine上源代码安装vim
|
||||
function compile_vim_on_alpine()
|
||||
{
|
||||
rm -rf ~/vim82
|
||||
git clone https://gitee.com/chxuan/vim82.git ~/vim82
|
||||
cd ~/vim82
|
||||
./configure --with-features=huge \
|
||||
--enable-multibyte \
|
||||
--with-tlib=ncurses \
|
||||
--enable-rubyinterp=yes \
|
||||
--enable-pythoninterp=yes \
|
||||
--enable-perlinterp=yes \
|
||||
--enable-luainterp=yes \
|
||||
--enable-gui=gtk2 \
|
||||
--enable-cscope \
|
||||
--prefix=/usr
|
||||
make
|
||||
make install
|
||||
cd -
|
||||
}
|
||||
# 在alpine上直装vim8.2
|
||||
# function compile_vim_on_alpine()
|
||||
# {
|
||||
# apk --upgrade add vim
|
||||
# cd -
|
||||
# }
|
||||
|
||||
# 在ubuntu上源代码安装vim
|
||||
function compile_vim_on_ubuntu()
|
||||
@ -326,9 +312,7 @@ function install_prepare_software_on_alpine()
|
||||
|
||||
apk update
|
||||
|
||||
apk add python3 python3-dev ruby ruby-dev lua lua-dev luajit luajit-dev ctags tcl tcl-dev perl perl-dev libx11 libx11-dev ncurses ncurses-dev g++ gcc git automake cmake fontconfig fontconfig-dev nerd-fonts
|
||||
|
||||
compile_vim_on_alpine
|
||||
apk add python3 python3-dev ruby ruby-dev lua lua-dev luajit luajit-dev ctags tcl tcl-dev perl perl-dev libx11 libx11-dev ncurses ncurses-dev g++ gcc make automake cmake fontconfig fontconfig-dev nerd-fonts gcompat clang clang-dev vim
|
||||
}
|
||||
|
||||
# 安装ubuntu必备软件
|
||||
@ -503,11 +487,21 @@ function install_ycm()
|
||||
git clone https://gitee.com/chxuan/YouCompleteMe-clang.git ~/.vim/plugged/YouCompleteMe
|
||||
|
||||
cd ~/.vim/plugged/YouCompleteMe
|
||||
|
||||
distro=`get_linux_distro`
|
||||
read -p "Please choose to compile ycm with python2 or python3, if there is a problem with the current selection, please choose another one. [2/3] " version
|
||||
if [[ $version == "2" ]]; then
|
||||
echo "Compile ycm with python2."
|
||||
# alpine 忽略 --clang-completer 并将 let g:ycm_clangd_binary_path 注入 .vimrc
|
||||
{
|
||||
if [ ${distro} == "Alpine" ]; then
|
||||
echo "##########################################"
|
||||
echo "Apline Build, need without GLIBC."
|
||||
echo "##########################################"
|
||||
sed -i "273ilet g:ycm_clangd_binary_path='/usr/bin/clang'" ~/.vimrc
|
||||
python2.7 ./install.py
|
||||
return
|
||||
fi
|
||||
} || {
|
||||
python2.7 ./install.py --clang-completer
|
||||
} || {
|
||||
echo "##########################################"
|
||||
@ -518,6 +512,16 @@ function install_ycm()
|
||||
else
|
||||
echo "Compile ycm with python3."
|
||||
{
|
||||
# alpine 跳过该步骤
|
||||
if [ ${distro} == "Alpine" ]; then
|
||||
echo "##########################################"
|
||||
echo "Apline Build, need without GLIBC."
|
||||
echo "##########################################"
|
||||
sed -i "273ilet g:ycm_clangd_binary_path='/usr/bin/clang'" ~/.vimrc
|
||||
python3 ./install.py
|
||||
return
|
||||
fi
|
||||
} || {
|
||||
python3 ./install.py --clang-completer
|
||||
} || {
|
||||
echo "##########################################"
|
||||
@ -685,6 +689,9 @@ function install_vimplus_on_alpine()
|
||||
backup_vimrc_and_vim
|
||||
install_prepare_software_on_alpine
|
||||
begin_install_vimplus
|
||||
|
||||
# 单独安装 ycm
|
||||
|
||||
}
|
||||
|
||||
# 在linux平上台安装vimplus
|
||||
|
||||
Loading…
Reference in New Issue
Block a user