junegunn / junegunn/seoul256.vim

Little script for dimming/brightening screen colors

Open
#39 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
Vim Script
Stars
1.8k
Forks
125
PR merge metrics
No merged PRs in 30d

Description

Not an issue

Working late at night I like adjusting the screen brightness/contrast. Perhaps someone else will also find this little mapping useful.

On Mac F1/F2 special keys (pressed together with Fn key) Dim/Brighten screen so this mapping seems very natural.

```
" brighten/dim background - a'la macOS dim screen function keys
" 233 (darkest) ~ 239 (lightest) 252 (darkest) ~ 256 (lightest)
function! Seoul256Brighten()
if g:seoul256_background == 239
let g:seoul256_background = 252
elseif g:seoul256_background == 256
let g:seoul256_background = 256
else
let g:seoul256_background += 1
endif
colo seoul256
endfunction
"
function! Seoul256Dim()
if g:seoul256_background == 252
let g:seoul256_background = 239
elseif g:seoul256_background == 233
let g:seoul256_background = 233
else
let g:seoul256_background -= 1
endif
colo seoul256
endfunction
"
nmap :call Seoul256Dim()
nmap :call Seoul256Brighten()
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.