feat: add vim-italics

This commit is contained in:
Aritra Mallick
2023-06-01 05:32:35 +00:00
committed by AJ ONeal
parent 522ebaddd0
commit 3383c1e322
3 changed files with 65 additions and 0 deletions
+23
View File
@@ -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.
+36
View File
@@ -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
+6
View File
@@ -0,0 +1,6 @@
" turn on spellcheck
set spell
" set spellcheck highlight to underline
hi clear SpellBad
hi SpellBad cterm=underline