From d24c769a614c2f1c2e6b2f186522864619478d47 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 24 Mar 2021 17:43:37 +0000 Subject: [PATCH] add vim-devicons --- vim-devicons/README.md | 20 ++++++++++++++++++++ vim-devicons/devicons.vim | 2 ++ vim-devicons/install.ps1 | 7 +++++++ vim-devicons/install.sh | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+) create mode 100644 vim-devicons/README.md create mode 100644 vim-devicons/devicons.vim create mode 100644 vim-devicons/install.ps1 create mode 100644 vim-devicons/install.sh diff --git a/vim-devicons/README.md b/vim-devicons/README.md new file mode 100644 index 0000000..fd64379 --- /dev/null +++ b/vim-devicons/README.md @@ -0,0 +1,20 @@ +--- +title: vim-devicons +homepage: https://github.com/ryanoasis/devicons +tagline: | + VimDevIcons: Adds Icons to Your Plugins. +--- + +**Important**: You must install [NerdFont](https://webinstall.dev/nerdfont) (and +configure your Terminal to use it) first. + +To update (replacing the current version) run `webi vim-devicons`. + +## Cheat Sheet + +![](https://raw.githubusercontent.com/wiki/ryanoasis/vim-devicons/screenshots/v0.10.x/overall-screenshot.png) + +> Adds icons to NERDTree, vim-airline, CtrlP, unite, Denite, lightline, +> vim-startify and many more + +vim-devicons is fairly plug-n-play. Install it, and it works. diff --git a/vim-devicons/devicons.vim b/vim-devicons/devicons.vim new file mode 100644 index 0000000..1dfc08c --- /dev/null +++ b/vim-devicons/devicons.vim @@ -0,0 +1,2 @@ +" The defaults are already rather reasonable. +" See https://github.com/ryanoasis/vim-devicons/wiki/Extra-Configuration diff --git a/vim-devicons/install.ps1 b/vim-devicons/install.ps1 new file mode 100644 index 0000000..6a8f082 --- /dev/null +++ b/vim-devicons/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 +} +Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\devicons" -Recurse -ErrorAction Ignore +& git clone --depth=1 https://github.com/ryanoasis/vim-devicons.git "$Env:USERPROFILE\.vim\pack\plugins\start\devicons.vim" diff --git a/vim-devicons/install.sh b/vim-devicons/install.sh new file mode 100644 index 0000000..68d96b7 --- /dev/null +++ b/vim-devicons/install.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +function __init_vim_devicons() { + set -e + set -u + + mkdir -p "$HOME/.vim/pack/plugins/start" + rm -rf "$HOME/.vim/pack/plugins/start/devicons.vim" + git clone --depth=1 https://github.com/ryanoasis/vim-devicons.git "$HOME/.vim/pack/plugins/start/devicons.vim" + + if [ ! -f "$HOME/.vimrc" ]; then + touch "$HOME/.vimrc" + fi + + mkdir -p ~/.vim/plugins + if ! [ -f "$HOME/.vim/plugins/devicons.vim" ]; then + WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"} + curl -fsSL -o ~/.vim/plugins/devicons.vim "$WEBI_HOST/packages/vim-devicons/devicons.vim" + fi + + if ! grep 'source.*plugins.devicons.vim' -r ~/.vimrc >/dev/null 2>/dev/null; then + set +e + mkdir -p ~/.vim/plugins + printf '\n" devicons: reasonable defaults from webinstall.dev/vim-devicons\n' >> ~/.vimrc + printf 'source ~/.vim/plugins/devicons.vim\n' >> ~/.vimrc + set -e + echo "" + echo "add ~/.vim/plugins/devicons.vim" + echo "updated ~/.vimrc with 'source ~/.vim/plugins/devicons.vim'" + fi + + echo "" + echo "vim-devicons enabled (NOTE: you must also have https://webinstall.dev/nerdfont)" + +} + +__init_vim_devicons -- 2.25.1