mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-02-14 17:49:53 +00:00
add vim-airline installer
This commit is contained in:
14
vim-airline/README.md
Normal file
14
vim-airline/README.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: vim-airline
|
||||
homepage: https://github.com/vim-airline/vim-airline
|
||||
tagline: |
|
||||
Lean & mean status/tabline for vim that's light as air.
|
||||
---
|
||||
|
||||
## Cheat Sheet
|
||||
|
||||
> Lean & mean status/tabline for vim that's light as air.
|
||||
|
||||

|
||||
|
||||
See the [vim-airline-themes](/vim-airline-themes) for additional themes.
|
||||
0
vim-airline/airline.vim
Normal file
0
vim-airline/airline.vim
Normal file
7
vim-airline/install.ps1
Normal file
7
vim-airline/install.ps1
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
IF (!(Test-Path -Path "$Env:USERPROFILE\.vim\pack\plugins\start")) {
|
||||
New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | out-null
|
||||
}
|
||||
Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\vim-airline" -Recurse -ErrorAction Ignore
|
||||
& git clone --depth=1 https://github.com/vim-airline/vim-airline.git "$Env:USERPROFILE\.vim\pack\plugins\start\vim-airline"
|
||||
36
vim-airline/install.sh
Normal file
36
vim-airline/install.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
__init_vim_airline() {
|
||||
set -e
|
||||
set -u
|
||||
|
||||
mkdir -p "$HOME/.vim/pack/plugins/start"
|
||||
rm -rf "$HOME/.vim/pack/plugins/start/vim-airline"
|
||||
git clone --depth=1 https://github.com/vim-airline/vim-airline.git "$HOME/.vim/pack/plugins/start/vim-airline"
|
||||
|
||||
if [ ! -f "$HOME/.vimrc" ]; then
|
||||
touch "$HOME/.vimrc"
|
||||
fi
|
||||
|
||||
mkdir -p ~/.vim/plugins
|
||||
if ! [ -f "$HOME/.vim/plugins/airline.vim" ]; then
|
||||
WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
|
||||
curl -fsSL -o ~/.vim/plugins/airline.vim "$WEBI_HOST/packages/vim-airline/airline.vim"
|
||||
fi
|
||||
|
||||
if ! grep 'source.*plugins.airline.vim' -r ~/.vimrc > /dev/null 2> /dev/null; then
|
||||
set +e
|
||||
mkdir -p ~/.vim/plugins
|
||||
printf '\n" vim-airline: reasonable defaults from webinstall.dev/vim-airline\n' >> ~/.vimrc
|
||||
printf 'source ~/.vim/plugins/airline.vim\n' >> ~/.vimrc
|
||||
set -e
|
||||
echo ""
|
||||
echo "add ~/.vim/plugins/airline.vim"
|
||||
echo "updated ~/.vimrc with 'source ~/.vim/plugins/airline.vim'"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "vim-airline enabled with reasonable defaults"
|
||||
}
|
||||
|
||||
__init_vim_airline
|
||||
Reference in New Issue
Block a user