     (backward-kill-word arg)))
 
 ;; useful augments of default binds
-(global-set-key (kbd "M-SPC") #'cycle-spacing)
-(global-set-key (kbd "M-c") #'capitalize-dwim)
-(global-set-key (kbd "M-u") #'upcase-dwim)
-(global-set-key (kbd "M-l") #'downcase-dwim)
-(global-set-key (kbd "C-w") #'t/kill-word-backward-or-region) ; vim/GNU Readline C-w
-(global-set-key (kbd "C-M-<backspace>") #'backward-kill-sexp)
-;; built-in, unused commands
-(global-set-key (kbd "C-z") #'zap-up-to-char)
-(global-set-key (kbd "C-x C-b") #'ibuffer) ; list buffers
-(global-set-key (kbd "C-c h v") #'set-variable) ; set variable
-;; Toggles
-(global-set-key (kbd "C-c t l") #'display-line-numbers-mode)
-(global-set-key (kbd "C-c t v") #'visual-line-mode)
-;; Applications
-(global-set-key (kbd "C-c o c") #'calendar)
+(general-def
+  "M-SPC" #'cycle-spacing
+  "M-c" #'capitalize-dwim
+  "M-u" #'upcase-dwim
+  "M-l" #'downcase-dwim
+  "C-w" #'t/kill-word-backward-or-region ; vim-like C-w except if region active
+  "C-M-<backspace>" #'backward-kill-sexp
+  ;; built-in, unused commands
+  "C-z" #'zap-up-to-char
+  "C-x C-b" #'ibuffer
+  "C-c h v" #'set-variable
+  ;; Toggles
+  "C-c t l" #'display-line-numbers-mode
+  "C-c t v" #'visual-line-mode
+  ;; Applications
+  "C-c o c" #'calendar)
 
 ;;;;; Text navigation and search
 

          (bury-buffer)
        (delete-char arg))))

  :bind
  (("C-c o e" . eshell))


           ((org-agenda-span 5)
            (org-agenda-start-on-weekday 1)
            (org-agenda-time-grid nil)))))

  :bind (("<f6>" . #'t/org-agenda-view)))

;; add latex class for exports
(use-package ox-latex
