Working on dynamic color schemes in vim

This commit is contained in:
Josh Sherman 2018-06-03 12:34:25 -05:00
parent 08c2a3fa0b
commit 8853ae6b70
No known key found for this signature in database
GPG key ID: 55B058A80530EF22
2 changed files with 11 additions and 1 deletions

11
aliases
View file

@ -52,6 +52,7 @@ function cd {
builtin cd "$@" && ls -F
}
# Run `nvm` init script on demand to avoid constant slow downs
function nvm {
if [ -z ${NVM_DIR+x} ]; then
export NVM_DIR="$HOME/.nvm"
@ -59,3 +60,13 @@ function nvm {
nvm "$@"
fi
}
function vim {
BACKGROUND=$(xtermcontrol --get-bg)
if [[ "$BACKGROUND" == "rgb:0000/2b2b/3636" ]]; then
env vim --cmd "set background=dark" $@
else
env vim --cmd "set background=light" $@
fi
}

1
vimrc
View file

@ -1,5 +1,4 @@
syntax on
set background=dark
color solarized
set ai et si sts=2 sw=2 ts=2