Skip to content

Instantly share code, notes, and snippets.

@jsylvanus
Last active April 26, 2018 20:19
Show Gist options
  • Save jsylvanus/caec49dd76b6299f935b to your computer and use it in GitHub Desktop.
Save jsylvanus/caec49dd76b6299f935b to your computer and use it in GitHub Desktop.
Squint test w/ BLOKK font
" Throw me in your ~/.gvimrc
let g:squinty = 0
function! Squint()
let windowBounds = system("osascript -e 'tell application \"MacVim\" to get bounds of window 1'")[:-2]
if g:squinty
set guifont=InputMonoCondensed_Thin:h14
let g:squinty = 0
else
set guifont=BLOKK:h6
let g:squinty = 1
endif
let thecommand = "osascript -e 'tell application \"MacVim\" to set bounds of window 1 to {" . windowBounds . "}'"
let result = system(thecommand)
redraw!
endfunction
nnoremap <F6> :call Squint()<CR>
@jsylvanus
Copy link
Author

It does seem to lose a little bit of height over several toggles...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment