From b406af83a642143a346c217408fc12950b625736 Mon Sep 17 00:00:00 2001 From: Ryan Burnette Date: Sun, 28 May 2023 21:41:51 -0400 Subject: [PATCH] add vim-airline installer --- vim-airline/README.md | 14 ++++++++++++++ vim-airline/airline.vim | 0 vim-airline/install.ps1 | 7 +++++++ vim-airline/install.sh | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 vim-airline/README.md create mode 100644 vim-airline/airline.vim create mode 100644 vim-airline/install.ps1 create mode 100644 vim-airline/install.sh diff --git a/vim-airline/README.md b/vim-airline/README.md new file mode 100644 index 0000000..df13d3c --- /dev/null +++ b/vim-airline/README.md @@ -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. + +![](https://github.com/vim-airline/vim-airline/wiki/screenshots/demo.gif) + +See the [vim-airline-themes](/vim-airline-themes) for additional themes. diff --git a/vim-airline/airline.vim b/vim-airline/airline.vim new file mode 100644 index 0000000..e69de29 diff --git a/vim-airline/install.ps1 b/vim-airline/install.ps1 new file mode 100644 index 0000000..6a822cf --- /dev/null +++ b/vim-airline/install.ps1 @@ -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" diff --git a/vim-airline/install.sh b/vim-airline/install.sh new file mode 100644 index 0000000..f421cab --- /dev/null +++ b/vim-airline/install.sh @@ -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