Working on dynamic color schemes in vim
This commit is contained in:
parent
08c2a3fa0b
commit
8853ae6b70
2 changed files with 11 additions and 1 deletions
11
aliases
11
aliases
|
@ -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
1
vimrc
|
@ -1,5 +1,4 @@
|
|||
syntax on
|
||||
set background=dark
|
||||
color solarized
|
||||
|
||||
set ai et si sts=2 sw=2 ts=2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue