Skip to content

Instantly share code, notes, and snippets.

@djfpaagman
Created December 4, 2013 09:35
Show Gist options
  • Save djfpaagman/7784827 to your computer and use it in GitHub Desktop.
Save djfpaagman/7784827 to your computer and use it in GitHub Desktop.
Change Vim Font Size Depending on Screen Size
" Set font size based on screen size. When vertical height is greater than 800
" (i.e. an external monitor is attached on a regular 13" MBP), use 18, else use 16.
if has('mac')
if system("osascript -e 'tell application \"Finder\" to get bounds of window of desktop' | cut -d ',' -f 4 | xargs") > 800
set guifont=Inconsolata\ for\ Powerline:h18
else
set guifont=Inconsolata\ for\ Powerline:h16
endif
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment