       :bind ("S-SPC" . er/expand-region))))
 
 (use-package yasnippet
-  ;; I use <M-tab> for yas and <C-tab> for hippie-expand
-  ;; <tab> sometimes gets shadowed
-  ;; defer loading until <M-tab> is calld
+  ;; defer loading until the mode is called
   :init (setq yas-snippet-dirs '(yas-installed-snippets-dir))
-  :bind ("<M-tab>" . yas-global-mode)
+  :bind ("<C-S-tab>" . yas-mode)
   :config
   (diminish 'yas-minor-mode " Y")
-  (unbind-key "<M-tab>" global-map)
-  (bind-key "<M-tab>" 'yas-expand yas-minor-mode-map))
-
-(use-package auto-complete-config
-  ;; de/activate ac mode with <S-tab>
-  ;; defer loading until <S-tab> is called
-  :ensure auto-complete
-  :bind ("<S-tab>" . global-auto-complete-mode)
-  :config (ac-config-default))
-
-(use-package rainbow-delimiters
-  ;; lightweight and fun, why not
-  :config (add-hook 'prog-mode-hook #'rainbow-delimiters-mode-enable))
+  (unbind-key "<tab>" yas-minor-mode-map)
+  (unbind-key "TAB" yas-minor-mode-map)
+  (bind-key "<S-tab>" 'yas-expand yas-minor-mode-map))
+
+(use-package company
+  ;; defer loading until the mode is called
+  :bind ("<C-tab>" . company-mode)
+  :config
+  (diminish 'company-mode " K")
+  (unbind-key "TAB" company-active-map)
+  (setq company-idle-delay 0
+        company-tooltip-align-annotations t)
+        
+  (use-package company-quickhelp
+    :config (company-quickhelp-mode 1))
+  
+  (use-package company-flx
+    ;; defer until the mode is needed
+    :bind ("<C-M-tab>" . company-flx-mode)))
 
 ;;;;;;;;;;;;;;;;;;;;;;
 ;; custom functions ;;

;;;;;;;;;;;;;
;; editing ;;
;;;;;;;;;;;;;

(use-package smartparens-config
  ;; defer loading til idle for one sec---although these editing aids

	     try-expand-line
	     try-expand-line-all-buffers
	     try-expand-whole-kill) t))
    (bind-keys ("<M-tab>" . hippie-expand)
	       ("M-/" . crazy-hippie-expand)))

  (use-package region-bindings-mode
    ;; hide some more goodies here
    :config (region-bindings-mode-enable)
    (bind-keys :map region-bindings-mode-map
	       ("q" . keyboard-quit)                  ;; quit
	       ("k" . kill-region)                    ;; kill
	       ("z" . delete-region)                  ;; zehen
	       ("c" . kill-ring-save)                 ;; copy
	       ("r" . replace-string)                 ;; replace
	       ("u" . upcase-initials-region)         ;; upcase
	       ("w" . comment-box)                    ;; wrap
	       ("g" . comment-or-uncomment-region)    ;; gloss
	       ("n" . mc/mark-next-like-this)         ;; next
	       ("j" . mc/unmark-next-like-this)       ;; jerk
	       ("p" . mc/mark-previous-like-this)     ;; prev
	       ("o" . mc/unmark-previous-like-this)   ;; off
               ("f" . mc/skip-to-next-like-this)      ;; forward
	       ("b" . mc/skip-to-previous-like-this)  ;; backward
	       ("a" . mc/edit-beginnings-of-lines)    ;; anfang
	       ("e" . mc/edit-ends-of-lines)          ;; ende
	       ("l" . mc/edit-lines)                  ;; line
	       ("x" . mc/mark-all-like-this-dwim)     ;; x
	       ("m" . mc/mark-all-in-region)	      ;; mark
	       ("t" . mc/mark-sgml-tag-pair)          ;; tag
	       ("d" . mc/mark-all-like-this-in-defun) ;; defun
	       ("h" . mc/mark-all-like-this)	      ;; (w)hole
	       ("i" . mc/insert-numbers)              ;; index
	       ("s" . mc/sort-regions)                ;; sort
	       ("v" . mc/reverse-regions)             ;; vert
	       )
    (use-package multiple-cursors
      ;; defer until main functions are called from here
