 
 (use-package flycheck
   ;; defer til the mode is called
-  :bind ("<C-M-S-tab>" . flycheck-mode)
+  :bind ("<C-M-S-tab>" . global-flycheck-mode)
   :config (use-package flycheck-pos-tip
             :config (setq flycheck-display-errors-function
                           #'flycheck-pos-tip-error-messages)))

    (setq TeX-view-program-list
          '(("DVI Viewer" "open %o")
            ;; http://www.stefanom.org/setting-up-a-nice-auctex-environment-on-mac-os-x/
            ("PDF Viewer" "/opt/homebrew-cask/Caskroom/skim/1.4.14/Skim.app/Contents/SharedSupport/displayline -b %n %o %b")
            ("HTML Viewer" "open %o")))))

;;;;;;;;;;;;;;;;


(use-package yasnippet
  ;; defer til the mode is called
  :bind ("<C-S-tab>" . yas-global-mode)
  :init (setq yas-snippet-dirs '(yas-installed-snippets-dir))
  :config (diminish 'yas-minor-mode " Y")
  (bind-key "<S-tab>" 'yas-expand yas-minor-mode-map)
  (unbind-key "<tab>" yas-minor-mode-map)
  (unbind-key "TAB" yas-minor-mode-map))

(use-package company
  ;; defer til the mode is called
  :bind ("<C-tab>" . global-company-mode)
  :diminish " K"
  :config
  (unbind-key "<tab>" company-active-map)
