 ;; keys for switching windows
 (windmove-default-keybindings 'meta)
 
+(put 'upcase-region 'disabled nil)
+(put 'downcase-region 'disabled nil)
+
 ;;;;;;;;;;;;;;
 ;; packages ;;
 ;;;;;;;;;;;;;;

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

(use-package smartparens-config
  ;; defer loading til idle for one sec
  :ensure smartparens
  :defer 1
  :config
  (set-face-attribute 'sp-show-pair-match-face nil
		      :background "black" :foreground "firebrick" :weight 'black)
  (set-face-attribute 'sp-show-pair-mismatch-face nil
		      :background "firebrick" :foreground "black" :weight 'black)
  (smartparens-global-mode t)
  (show-smartparens-global-mode t)
  ;; code by Rommel M. Martinez, see link below

	     try-expand-line-all-buffers
	     try-expand-whole-kill) t))
    (bind-keys ("<C-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
      ;; or from the region-bindings-mode-map
      :bind
      ("C-'"  . mc/mark-pop) ;; also runs mc-hide-unmatched-lines-mode
      ("C-\"" . mc/mark-all-dwim)
      ("<C-right>" . mc/mark-next-like-this)
      ("<C-up>"    . mc/mark-previous-like-this)
      ("<C-down>"  . mc/unmark-previous-like-this)
      ("<C-left>"  . mc/unmark-next-like-this)
      :config
      (set-face-attribute 'mc/cursor-face nil :weight 'black
			  :background "goldenrod" :foreground "black"))

    (use-package expand-region
      ;; defer until the main function is called
      :bind ("S-SPC" . er/expand-region))))

(use-package yasnippet
  ;; I use <M-tab> for yas and <C-tab> for hippie-expand
