Skip to content

nburns/vim-auto-light-dark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

vim-auto-light-dark

Makes vim track macOS's Appearance mode. When the mode changes this plugin will call a user defined hook to change vim settings for light or dark color schemes.

When running on another OS falls back to changing the color mode to dark at 5 PM.

Appearance Mode Changing

Installation

Vundle

Plugin 'nburns/vim-auto-light-dark'

Setup

In your ~/.vimrc define 2 functions, one for light mode and one for dark mode. On startup, and when a change is detected, the function corresponding to the current color mode will be called.

function DarkMode()
    colorscheme solarized8_high
    set background=dark
    let g:lightline = { 'colorscheme': 'solarized' }
endfunction

function LightMode()
    colorscheme bbedit
    set background=light
    let g:lightline = { 'colorscheme': 'PaperColor' }
endfunction

About

Changes vim's color mode based on system appearance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published