diff --git a/vim-italics/README.md b/vim-italics/README.md new file mode 100644 index 0000000..1273ed8 --- /dev/null +++ b/vim-italics/README.md @@ -0,0 +1,23 @@ +--- +title: vim-italics +homepage: https://webinstall.dev/vim-italics +tagline: | + vim-italics is refactors the text to italics. +--- + +To update (replacing the current version) run `webi vim-italics`. + + +## Cheat Sheet + +Vim-italics turns text to italics. + +### How to install manually + +```ruby +highlight htmlItalic gui=italic ctermfg=214 +``` + +You'll need a font with an italic set and a terminal capable of displaying italics. Also, if you're using a color scheme other than the default, the above line should come after the color scheme is loaded in your ```~/.vimrc``` so that the color scheme doesn't override it. + +The cterm makes it work in the terminal and the gui is for graphical Vim clients. diff --git a/vim-italics/install.sh b/vim-italics/install.sh new file mode 100644 index 0000000..fd11eea --- /dev/null +++ b/vim-italics/install.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +__init_vim_italics() { + set -e + set -u + + mkdir -p "$HOME/.vim/plugins" + rm -rf "$HOME/.vim/plugins/italics.vim" + + echo "" + + if [ ! -e "$HOME/.vimrc" ]; then + touch "$HOME/.vimrc" + fi + + if ! [ -f "$HOME/.vim/plugins/italics.vim" ]; then + mkdir -p ~/.vim/plugins + WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"} + curl -fsS -o ~/.vim/plugins/italics.vim "$WEBI_HOST/packages/vim-italics/italics.vim" + fi + + if ! grep 'source.*plugins.italics.vim' -r ~/.vimrc > /dev/null 2> /dev/null; then + set +e + mkdir -p ~/.vim/plugins + printf '\n" italics Check: reasonable defaults from webinstall.dev/vim-italics\n' >> ~/.vimrc + printf 'source ~/.vim/plugins/italics.vim\n' >> ~/.vimrc + set -e + echo "added ~/.vim/plugins/italics.vim" + echo "updated ~/.vimrc with 'source ~/.vim/plugins/italics.vim'" + echo "" + fi + + echo "vim-italics enabled with reasonable defaults" +} + +__init_vim_italics diff --git a/vim-italics/spell.vim b/vim-italics/spell.vim new file mode 100644 index 0000000..7b33a98 --- /dev/null +++ b/vim-italics/spell.vim @@ -0,0 +1,6 @@ +" turn on spellcheck +set spell + +" set spellcheck highlight to underline +hi clear SpellBad +hi SpellBad cterm=underline