Mastodon

SaneKeys

My personal keybindings for Emacs , 2021-07-05T11:00:00+02:00

Intention

Emacs keymappings have a longs history. As I changed from vim to emacs i knew that those mapping are even more insane in emacs than in vim, but i also found that they are more easy changeable in emacs. The keys are organized in keymaps, which are attached to different modes.

And you can do your configuration files in "literal programming" which is a method, that uses extensive comments around small code snippets that do the actual work, and can be executed. This file (that you read now) for example is meant to be used as the explanation for the keybindings, as well as to be the configuration file itself.

First you will find an overview of all keys that I want to map. The columns give the desired function für the keys.

Overview

This table is a little bit narrow, when shown on github. For a full width table I recommend the wide-github extension für google-chrome. It's usefull in general.

Lttr Solo Shft Ctrl Ctrl+Shft Alt Alt+Shft Ctrl+Alt Ctrl-Alt-Shft <menu> (Meta Hydra)  
      (Basic Functions) (Ext. Functions)     (Applications) (More Apps)    
0 self self Close this window   NumPrefix          
1 self self Make window only one   NumPrefix          
2 self self Split window right   NumPrefix          
3 self self Split window below   NumPrefix          
4 self self     NumPrefix          
5 self self     NumPrefix          
6 self self     NumPrefix          
7 self self     NumPrefix          
8 self self     NumPrefix          
9 self self     NumPrefix          
A self self Mark all              
B self self Bookmarks Buffers            
C self self Copy       My Own Calendar      
D self self org-store-link Save Bookmark     DirEd      
E self self Export   Effort          
F self self Find String Find backwards Find Regex Find Regex backw. Feedreader      
G self self keyboard-quit       Git (Magit)      
H self self Replace String   Replace Regex   <HomeWork>      
I self self --- Insert File Show images   Internet      
J self self Join lines (reformat)              
K self self Kill line              
L self self org-insert-link       <Links>      
M self self ---       Mail Maps    
N self self New File       Notes      
O self self Open File Open Recent     odo.org      
P self self Print              
Q self self Quit              
R self self Revert Revert all Org buffers Refile          
S self self Save Save under Save all          
T self self                
U self self Umbrüche (an/aus)              
V self self Paste              
W self self Close Buffer              
X self self Cut              
Y self self cua-set-mark cua-set-rectangle-mark            
Z self self Undo              
Space     org-capture              
Esc keyboard-quit                  
.                    
+     Zoom in              
-     Zoom out              
.#     Zoom normal              
F1 Help                  
F2                    
F3 [Find again] Find again backw                
F4                    
F5                    
F6                    
F7                    
F8                    
F9                    
F10                    
F11 Time-hydra                  
F12 Agenda                  
                     

Configuration

Basics

German Umlauts

Da ich auf meinem englis

(global-set-key (kbd "s-a") (lambda () (interactive) (insert "ä")))
(global-set-key (kbd "s-o") (lambda () (interactive) (insert "ö")))
(global-set-key (kbd "s-u") (lambda () (interactive) (insert "ü")))
(global-set-key (kbd "s-s") (lambda () (interactive) (insert "ß")))
(global-set-key (kbd "s-A") (lambda () (interactive) (insert "Ä")))
(global-set-key (kbd "s-O") (lambda () (interactive) (insert "Ö")))
(global-set-key (kbd "s-U") (lambda () (interactive) (insert "Ü")))

unbind special keys

(global-unset-key (kbd "<f16>"))
(global-unset-key (kbd "<f18>"))
(global-unset-key (kbd "<f20>"))
(global-unset-key (kbd "<undo>"))
(global-unset-key (kbd "<redo>"))
(global-unset-key (kbd "<escape>"))

Control and Shift Control

(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
(global-set-key (kbd "C-a") 'mark-whole-buffer)
(global-set-key (kbd "C-b") 'list-bookmarks)
(global-set-key (kbd "C-d") 'org-store-link)
(global-set-key (kbd "C-e") 'org-export-dispatch)
(global-set-key (kbd "C-f") 'isearch-forward)
(global-set-key (kbd "C-g") 'keyboard-quit)
(global-set-key (kbd "C-h") 'replace-string)
(global-set-key (kbd "C-j") 'org-fill-paragraph)
(global-set-key (kbd "C-k") 'a)
(global-set-key (kbd "C-l") 'org-insert-link)
(global-set-key (kbd "C-n") 'find-file)
(global-set-key (kbd "C-o") 'helm-for-files)
(global-set-key (kbd "C-p") 'print-buffer)
(global-set-key (kbd "C-q") 'save-buffers-kill-emacs)
(global-set-key (kbd "C-r") 'revert-buffer)
(global-set-key (kbd "C-s") 'save-buffer)
(global-set-key (kbd "C-s-s") 'org-save-all-org-buffers)
(global-set-key (kbd "C-t") 'a)
(global-set-key (kbd "C-u") 'a)
(global-set-key (kbd "C-w") 'kill-this-buffer)
(global-set-key (kbd "C-y") 'a)
(global-set-key (kbd "C-z") 'undo) 
(global-set-key (kbd "C-<return>") 'org-capture)
(global-set-key (kbd "C-<delete>") 'kill-whole-line)

(global-set-key (kbd "<f3>") 'isearch-repeat-forward)
(global-set-key (kbd "C-<tab>") `other-window)
(global-set-key (kbd "M-<tab>") `next-buffer)
(global-set-key (kbd "C-<del>") `kill-line)
(global-set-key (kbd "C-<f12>") `org-agenda-execute)
(global-set-key (kbd "<f12>") (lambda () (interactive) (org-agenda nil "n")))

File handling

(global-set-key (kbd "C-S-o") 'recentf-open-files)
(global-set-key (kbd "C-<insert>") 'insert-file)
(global-set-key (kbd "<mouse-3>") 'menu-bar-open)
(global-set-key (kbd "<f5>") 'revert-buffer)
(global-set-key (kbd "C-S-r") 'org-revert-all-org-buffers)

Image handling

(global-set-key (kbd "M-i") (lambda () (interactive) (iimage-mode-buffer t)))
(define-key org-mode-map (kbd "M-i") (lambda () (interactive) (iimage-mode-buffer t)))

Window handling

(global-set-key (kbd "s-<left>") 'delete-frame)
(global-set-key (kbd "s-<up>") 'delete-other-frames)
(global-set-key (kbd "s-<right>") 'make-frame-command)
(global-set-key (kbd "s-<down>") 'make-frame-command)
(global-set-key (kbd "C-s-<left>") 'delete-window)
(global-set-key (kbd "C-s-<up>") 'delete-other-windows)
(global-set-key (kbd "C-s-<down>") 'split-window-below)
(global-set-key (kbd "C-s-<right>") 'split-window-right)

Messages

(define-key messages-buffer-mode-map (kbd "<escape>") 'quit-window)

Zooming

(global-set-key (kbd "C-+") 'text-scale-increase)
(global-set-key (kbd "C--") 'text-scale-decrease)

Find and Replace

The whole thing of search & replace consist of three keys:

f
for findig
f3
für repeating the search
h
für replacing
Ctrl
does it for Strings
Meta
does it for regular expressions
Shft
does it backwards
(global-set-key (kbd "C-f") 'isearch-forward)
(define-key org-mode-map (kbd "C-f") 'isearch-forward)
(global-set-key (kbd "C-S-f") 'isearch-backward)
(define-key org-mode-map (kbd "C-S-f") 'isearch-backward)
(global-set-key (kbd "M-f") 'isearch-forward-regexp)
(define-key org-mode-map (kbd "M-f") 'isearch-forward-regexp)
(global-set-key (kbd "M-S-f") 'isearch-backward-regexp)
(define-key org-mode-map (kbd "M-S-f") 'isearch-backward-regexp)

(global-set-key (kbd "<f3>") 'isearch-repeat-forward)
(define-key org-mode-map (kbd "<f3>") 'isearch-repeat-forward)
(global-set-key (kbd "S-<f3>") 'isearch-repeat-backward)
(define-key org-mode-map (kbd "S-<f3>") 'isearch-repeat-backward)

(global-set-key (kbd "C-h") 'replace-string)
(define-key org-mode-map (kbd "C-h") 'replace-string)
(global-set-key (kbd "M-h") 'replace-regexp)
(define-key org-mode-map (kbd "M-h") 'replace-regexp)

Export

(global-set-key (kbd "C-e") 'org-export-dispatch)
(define-key org-mode-map (kbd "C-e") 'org-export-dispatch)

Setting the mark

As there is no use for a redo in emacs (undo can do that by itself) we can use that key for setting the mark.

(global-set-key (kbd "C-\\" ) 'cua-set-mark)
(global-set-key (kbd "C-|") 'cua-set-rectangle-mark)
(define-key org-mode-map (kbd "C-\\") 'cua-set-mark)
(define-key org-mode-map (kbd "C-|" ) 'cua-set-rectangle-mark)
(global-set-key (kbd "C-a") 'mark-whole-buffer)
(define-key org-mode-map (kbd "C-a") 'mark-whole-buffer)

Link handling

(global-set-key (kbd "C-S-d") 'bookmark-set)
(define-key org-mode-map (kbd "C-S-d") 'bookmark-set)

(global-set-key (kbd "C-d") 'org-store-link)
(define-key org-mode-map (kbd "C-d") 'org-store-link)

(global-set-key (kbd "C-l") 'org-insert-link-global)
(define-key org-mode-map (kbd "C-l") 'org-insert-link)

Sanitazing whitespace

(global-set-key (kbd "M-<kpd-enter>") 'delete-blank-lines)

Emacs

Custom-Mode

(define-key custom-mode-map (kbd "C-s") 'Custom-save)
(define-key custom-mode-map (kbd "<escape>") 'Custom-buffer-done)

Speedbar

(global-set-key (kbd "<f9>") 'speedbar)

Help-Mode

(define-key help-mode-map (kbd "<escape>") 'quit-window)

Shell

(global-set-key (kbd "C-M-SPC") 'shell)
(define-key org-mode-map (kbd "C-M-SPC") 'shell)

Dired

  (global-set-key (kbd "C-M-d") 'dired)
  (global-set-key (kbd "s-d") 'dired)
  (global-set-key (kbd "s-S-D") 'dired-other-frame)

  (define-key dired-mode-map (kbd "<tab>") 'dired-hide-subdir)
  (define-key dired-mode-map (kbd "S-<tab>") 'dired-hide-all)
;  (define-key dired-mode-map (kbd "<Space>") 'dired-mark)
  (define-key dired-mode-map (kbd "-") 'dired-unmark)
  (define-key dired-mode-map (kbd "*") 'dired-mark-files-regexp)

  (define-key dired-mode-map (kbd "*") 'find-name-dired)
  (define-key dired-mode-map (kbd "*") 'find-grep-dired)
  (define-key dired-mode-map (kbd "*") 'find-dired); (variable find-ls-option)


  (define-key dired-mode-map (kbd "<down>") 'dired-next-line)
  (define-key dired-mode-map (kbd "<up>") 'dired-previous-line)

  (define-key dired-mode-map (kbd "*") 'dired-goto-file)
  (define-key dired-mode-map (kbd "C-f") 'dired-isearch-filenames)
  (define-key dired-mode-map (kbd "C-S-f") 'dired-isearch-filenames-regexp)

  (define-key dired-mode-map (kbd "M-<right>") 'dired-maybe-insert-subdir)

  (define-key dired-mode-map (kbd "*") 'dired-do-redisplay)
  (define-key dired-mode-map (kbd "*") 'revert-buffer);  (variable dired-auto-revert-buffer)
  (define-key dired-mode-map (kbd "*") 'dired-do-kill-lines)

  (define-key dired-mode-map (kbd "*") 'dired-sort-toggle-or-edit)

  (define-key dired-mode-map (kbd "M-<left>") 'dired-up-directory)
  (define-key dired-mode-map (kbd "*") 'dired-next-subdir)
  (define-key dired-mode-map (kbd "*") 'dired-prev-subdir)
  (define-key dired-mode-map (kbd "M-<up>") 'dired-tree-up)
  (define-key dired-mode-map (kbd "*") 'dired-tree-down)
  (define-key dired-mode-map (kbd "*") 'dired-prev-dirline)
  (define-key dired-mode-map (kbd "*") 'dired-next-dirline)

  (define-key dired-mode-map (kbd "d") 'dired-flag-file-deletion)
  (define-key dired-mode-map (kbd "#") 'dired-flag-auto-save-files)
  (define-key dired-mode-map (kbd "~") 'dired-flag-backup-files)
  (define-key dired-mode-map (kbd "*") 'dired-clean-directory)
  (define-key dired-mode-map (kbd "%") 'dired-flag-garbage-files) ; (variable dired-garbage-files-regexp)
  (define-key dired-mode-map (kbd "*") 'dired-flag-files-regexp)


  (define-key dired-mode-map (kbd "_") 'dired-unmark-backward)
  (define-key dired-mode-map (kbd "S-d") 'dired-do-flagged-delete)

  (define-key dired-mode-map (kbd "<delete>") 'dired-do-delete)
  (define-key dired-mode-map (kbd "c") 'dired-do-copy)
  (define-key dired-mode-map (kbd "h") 'dired-do-hardlink)
  (define-key dired-mode-map (kbd "r") 'dired-do-rename)
  (define-key dired-mode-map (kbd "l") 'dired-do-symlink)
  (define-key dired-mode-map (kbd "m") 'dired-do-chmod)
  (define-key dired-mode-map (kbd "g") 'dired-do-chgrp)
  (define-key dired-mode-map (kbd "o") 'dired-do-chown)
  (define-key dired-mode-map (kbd "t") 'dired-do-touch)
  (define-key dired-mode-map (kbd "C-p") 'dired-do-print)

  (define-key dired-mode-map (kbd "z") 'dired-do-compress)
  (define-key dired-mode-map (kbd "S-z") 'dired-do-compress-to)

  (define-key dired-mode-map (kbd ";") 'epa-dired-do-byte-compile)

  (define-key dired-mode-map (kbd "<enter>") 'dired-find-file)
  (define-key dired-mode-map (kbd "*") 'dired-find-file-other-window)
  (define-key dired-mode-map (kbd "*") 'dired-display-file)
  (define-key dired-mode-map (kbd "*") 'dired-view-file)

  (define-key dired-mode-map (kbd "<space>") 'dired-toggle-marks)
  (define-key dired-mode-map (kbd "*") 'dired-unmark-backward)
  (define-key dired-mode-map (kbd "*") 'dired-unmark-all-marks)
  (define-key dired-mode-map (kbd "*") 'dired-mark-files-regexp)
  (define-key dired-mode-map (kbd "*") 'dired-mark-files-containing-regexp)
  (define-key dired-mode-map (kbd "C-z") 'dired-undo)

  (define-key dired-mode-map (kbd "*") 'dired-previous-marked-file)
  (define-key dired-mode-map (kbd "*") 'dired-next-marked-file)

  (define-key dired-mode-map (kbd "*") 'dired-mark-executables)
  (define-key dired-mode-map (kbd "*") 'dired-mark-symlinks)
  (define-key dired-mode-map (kbd "*") 'dired-mark-directories)
  (define-key dired-mode-map (kbd "*") 'dired-mark-subdir-files)

  (define-key dired-mode-map (kbd "*") 'dired-do-shell-command)

  (define-key dired-mode-map (kbd "*") 'dired-diff)
  (define-key dired-mode-map (kbd "*") 'dired-reset-subdir-switches)

  (define-key dired-mode-map (kbd "*") 'dired-toggle-read-only) ; (Wdired mode)
  (define-key dired-mode-map (kbd "*") 'wdired-finish-edit) ; (C-c C-c)

  (define-key dired-mode-map (kbd "*") 'image-dired-display-thumbs) ; (30.18 im emacs manual)
  (define-key dired-mode-map (kbd "*") 'image-dired)
  (define-key dired-mode-map (kbd "*") 'image-dired-display-thumbnail-original-image) ;to display a sized
  (define-key dired-mode-map (kbd "*") 'image-dired-display-previous-thumbnail-original) ;backs up to the
  (define-key dired-mode-map (kbd "*") 'image-dired-thumbnail-display-external) 
  (define-key dired-mode-map (kbd "*") 'image-dired-flag-thumb-original-file) ;to flag the image file for
  (define-key dired-mode-map (kbd "*") 'image-dired-delete-char)
  (define-key dired-mode-map (kbd "*") 'image-dired-tag-files)
  (define-key dired-mode-map (kbd "*") 'image-dired-mark-tagged-files)

  (define-key dired-mode-map (kbd "C-<insert>") 'dired-create-directory)

  (define-key dired-mode-map (kbd "*") 'dired-do-isearch)
  (define-key dired-mode-map (kbd "*") 'dired-do-isearch-regexp)

  (define-key dired-mode-map (kbd "*") 'dired-copy-filename-as-kill)

  (define-key dired-mode-map (kbd "*") 'browse-url-of-dired-file)

  (define-key dired-mode-map (kbd "*") 'dired-hide-details-mode) ; (toggle)

  (define-key dired-mode-map (kbd "=") 'dired-compare-directories) 

Date-Picker

(global-set-key (kbd "C-M-k") 'calendar)
(define-key org-read-date-minibuffer-local-map (kbd "<right>")(lambda () (interactive) (org-eval-in-calendar '(calendar-forward-day 1))))
(define-key org-read-date-minibuffer-local-map (kbd "<left>") (lambda () (interactive) (org-eval-in-calendar '(calendar-backward-day 1))))
(define-key org-read-date-minibuffer-local-map (kbd "<down>") (lambda () (interactive) (org-eval-in-calendar '(calendar-forward-week 1))))
(define-key org-read-date-minibuffer-local-map (kbd "<up>") (lambda () (interactive) (org-eval-in-calendar '(calendar-backward-week 1))))
(define-key org-read-date-minibuffer-local-map (kbd "S-<right>") (lambda () (interactive) (org-eval-in-calendar '(calendar-forward-month 1))))
(define-key org-read-date-minibuffer-local-map (kbd "S-<leftt>") (lambda () (interactive) (org-eval-in-calendar '(calendar-backward-month 1))))
(define-key org-read-date-minibuffer-local-map (kbd "S-<down>") (lambda () (interactive) (org-eval-in-calendar '(calendar-forward-year 1))))
(define-key org-read-date-minibuffer-local-map (kbd "S-<up>") (lambda () (interactive) (org-eval-in-calendar '(calendar-backward-year 1))))
(define-key org-read-date-minibuffer-local-map (kbd ">") (lambda () (interactive) (org-eval-in-calendar '(calendar-scroll-right-three-months))))
(define-key org-read-date-minibuffer-local-map (kbd "<") (lambda () (interactive) (org-eval-in-calendar '(calendar-scroll-left-three-months))))
(define-key org-read-date-minibuffer-local-map (kbd ".") (lambda () (interactive) (org-eval-in-calendar '(calendar-goto-today))))
(define-key org-read-date-minibuffer-local-map (kbd "d") (lambda () (interactive) (org-eval-in-calendar '(diary-view-entries))))

Compilation

(define-key compilation-mode-map (kbd "<escape>") 'quit-window)

Major Modes

Org

Die wesentlichen Tasten sind zum öffnen und speichern einer Datei Ctl-n (new) um eine Datei anzulegen Ctl-o (open) um eine Datei zu öffnen Ctl-s (save) um eine Datei zu speichern

(define-key org-mode-map (kbd "C-n") 'find-file)
(define-key org-mode-map (kbd "C-o") 'helm-for-files)
(define-key org-mode-map (kbd "C-s") 'save-buffer)

Zusammen mit der Shift-Taste wird daraus dann Ctrl-Shift-o um eine der zuletzt verwendeten Dateien zu öffnen Ctrl-Shift-s um die Datei unter einem anderen Namen zu speichern

(define-key org-mode-map (kbd "C-S-o") 'recentf-open-files)
(define-key org-mode-map (kbd "C-S-s") 'write-file)

Ctrl-w (wipe) schliesst den Buffer, und Ctrl-r (revert) stellt ihn aus der Datei wieder her

Zusammen mit der Super-Taste werden gleich alle Org-Files wieder hergestellt

(define-key org-mode-map (kbd "C-w") 'kill-this-buffer)
(define-key org-mode-map (kbd "C-r") 'revert-buffer)
(define-key org-mode-map (kbd "C-s-r") 'org-revert-all-org-buffers)

Ebenso funktioniert die Supertaste beim speichern Ctrl-Super-s speichert alle Org-Dateien gleichzeitig

Ausserdem gibt es auf meiner Zusatztastatur einen Focus Button

(define-key org-mode-map (kbd "<XF86Launch5>") 'org-tree-to-indirect-buffer)

Agenda

    (define-key org-agenda-mode-map (kbd "<escape>") 'org-agenda-quit)
    (define-key org-agenda-mode-map (kbd "<f5>") 'org-agenda-redo)
(define-key org-agenda-mode-map (kbd "C-s") 'org-save-all-org-buffers)

Capturing

(global-set-key (kbd "C-SPC") 'org-capture)

Tab-Bar

(global-set-key (kbd "C-t") 'tab-bar-new-tab)
(global-set-key (kbd "C-S-t") 'tab-bar-undo-close-tab)

Etc

(global-set-key (kbd "<escape>") 'keyboard-quit)

Applications

HideShow

;  (define-key hs-minor-mode-map [s-mouse-1] 'hs-toggle-hiding)
;  (define-key hs-minor-mode-map [s-mouse-3] 'hs-hide-level)
;  (define-key hs-minor-mode-map (kbd "s-<return>") 'hs-toggle-hiding)

Emacsshot

(global-set-key (kbd "s-<print>") 'emacsshot-snap-window)
(global-set-key (kbd "S-s-<print>") 'emacsshot-snap-window-include-modeline)
(global-set-key (kbd "C-S-s-<print>") 'emacsshot-snap-frame)

eww

(define-key eww-mode-map (kbd "C-u") 'eww-view-source)
(define-key eww-mode-map (kbd "M-<left>") 'eww-back-url)
(define-key eww-mode-map (kbd "M-<right>") 'eww-forward-url)
(define-key eww-mode-map (kbd "M-<up>") 'eww-top-url)
(define-key eww-mode-map (kbd "r") 'eww-readable)
(define-key eww-mode-map (kbd "v") 'eww-browse-with-external-browser)
(define-key eww-mode-map (kbd "<F5>") 'eww-reload)
(define-key eww-mode-map (kbd "C-r") 'eww-reload)
(define-key eww-mode-map (kbd "C-s") 'eww-download)
(define-key eww-mode-map (kbd "C-h") 'helm-eww-history)
(define-key eww-mode-map (kbd "C-T") 'helm-eww-buffers)
(define-key eww-mode-map (kbd "S-<return>") 'eww-open-in-new-buffer)
(define-key eww-mode-map (kbd "<space>") 'eww-toggle-checkbox)

Feedreader

(global-set-key (kbd "C-M-f") 'elfeed)
(global-set-key (kbd "<f19>") 'elfeed)
(define-key elfeed-search-mode-map (kbd "<f5>") 'elfeed-search-fetch)
(define-key elfeed-search-mode-map (kbd "C-e") 'elfeed-export-opml)

Finances

(global-set-key (kbd "C-M-f") '(lambda nil (interactive) (find-file "~/fin/drops.ledger")))
(global-set-key (kbd "s-f") '(lambda nil (interactive) (find-file "~/fin/drops.ledger")))
(global-set-key (kbd "<XF86AudioRaiseVolume>") '(lambda nil (interactive) (find-file "~/fin/drops.ledger")))
;(define-key ledger-mode-map (kbd "<XF86Launch2>") 'ledger-navigate-prev-uncleared)
;(define-key ledger-mode-map (kbd "<XF86Launch3>") 'ledger-navigate-prev-xact-or-directive)
;(define-key ledger-mode-map (kbd "<XF86Launch4>") 'ledger-navigate-next-xact-or-directive)
;(define-key ledger-mode-map (kbd "<XF86Launch5>") 'ledger-navigate-next-uncleared)
;(define-key ledger-mode-map (kbd "<XF86Launch7>") 'ledger-toggle-current)

Google-Maps

(global-set-key (kbd "C-M-S-m") 'google-maps)

Helm

(global-set-key (kbd "M-x") 'helm-M-x)
;(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action)

Internet

(global-set-key (kbd "C-M-i") 'eww)
(define-key org-mode-map (kbd "C-M-i") 'eww)
(define-key org-mode-map (kbd "s-i") 'eww)

Magit

As Magit is an application it is called via an Ctrl-Alt combination

(global-set-key (kbd "C-M-g") 'magit-status)
(global-set-key (kbd "s-g") 'magit-status)

mu4e

The famous mail client

(when (my-system-type-is-linux)
      (global-set-key (kbd "C-M-m") 'mu4e)
      (global-set-key (kbd "s-m") 'mu4e)
      (global-set-key (kbd "<XF86AudioLowerVolume>") 'mu4e)
      (define-key mu4e-main-mode-map (kbd "<f5>") 'mu4e-update-mail-and-index)
      (define-key mu4e-headers-mode-map (kbd "<f5>") 'mu4e-update-mail-and-index)
      (define-key mu4e-main-mode-map (kbd "<escape>") 'mu4e-quit)
      (define-key mu4e-headers-mode-map (kbd "<escape>") 'mu4e~headers-quit-buffer)
      (define-key mu4e-view-mode-map (kbd "<f5>") 'mu4e-update-mail-and-index)
      (define-key mu4e-view-mode-map (kbd "C-u") 'mu4e-view-raw-message)
      (define-key mu4e-view-mode-map (kbd "<escape>") 'mu4e~view-quit-buffer)
)

pass

(global-set-key (kbd "<XF86AudioMute>") 'pass)

Yankpad

(global-set-key (kbd "s-<tab>") 'yankpad-expand)

DictCC

(global-set-key (kbd "<f21>") 'dictcc)
(global-set-key (kbd "C-<f21>") 'dictcc-at-point)

Loading special org files

Main.org

(global-set-key (kbd "C-M-.") '(lambda nil (interactive) (find-file "~/org/ops.org")))
(global-set-key (kbd "M-<home>") '(lambda nil (interactive) (find-file "~/org/ops.org")))
(global-set-key (kbd "s-h") '(lambda nil (interactive) (find-file "~/org/ops.org")))
(global-set-key (kbd "<XF86AudioPrev>") '(lambda nil (interactive) (find-file "~/org/ops.org")))

haushalt.org

(global-set-key (kbd "C-M-h") '(lambda nil (interactive) (find-file "~/org/haushalt.org")))

Notes.org

(global-set-key (kbd "C-M-n") '(lambda nil (interactive) (find-file "~/org/Notes.org")))
(global-set-key (kbd "s-n") '(lambda nil (interactive) (find-file "~/org/Notes.org")))

links.org

(global-set-key (kbd "C-M-l") '(lambda nil (interactive) (find-file "~/org/links.org")))
(global-set-key (kbd "C-b") '(lambda nil (interactive) (find-file "~/org/links.org")))
(global-set-key (kbd "<XF86AudioStop>") '(lambda nil (interactive) (find-file "~/org/links.org")))

Projecte.org

(global-set-key (kbd "<XF86AudioPlay>") '(lambda nil (interactive) (find-file "~/org/prj.org")))

Agenda.org

(global-set-key (kbd "<XF86Launch6>") (lambda () (interactive) (org-agenda nil "n")))

wiki.org

(global-set-key (kbd "C-M-w") '(lambda nil (interactive) (find-file "~/wiki/pages/start.txt")))
(global-set-key (kbd "s-w") '(lambda nil (interactive) (find-file "~/wiki/pages/start.txt")))

Einkaufszettel

(global-set-key (kbd "<f17>") '(lambda nil (interactive) (find-file "~/org/Einkaufen.org")))

Centaur-Tabs

(define-key centaur-tabs-mode-map (kbd "C-M-<left>") 'centaur-tabs-backward)
(define-key centaur-tabs-mode-map (kbd "C-M-<right>") 'centaur-tabs-forward)
(define-key centaur-tabs-mode-map (kbd "C-M-<down>") 'centaur-tabs-backward-group)
(define-key centaur-tabs-mode-map (kbd "C-M-<up>") 'centaur-tabs-forward-group)