Guest User

Untitled

a guest
Dec 15th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. " capture the current interface style
  2. let g:apple_interface_style=system("defaults read -g AppleInterfaceStyle")
  3.  
  4. " run code based on the current interface style
  5. if g:apple_interface_style ==? "dark\n"
  6. set bg=dark
  7. elseif g:apple_interface_style ==? "light\n"
  8. set bg=light
  9. endif
  10.  
  11. " add leader commands to change after vim starts
  12. nn <leader>d :!osascript -e "tell application \"System Events\" to tell appearance preferences to set dark mode to true"<CR><CR>
  13. nn <leader>l :!osascript -e "tell application \"System Events\" to tell appearance preferences to set dark mode to false"<CR><CR>
Add Comment
Please, Sign In to add comment