aboutsummaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2019-01-28 12:38:50 +0000
committerYann Herklotz <ymherklotz@gmail.com>2019-01-28 12:38:50 +0000
commitaa93f3d2d24028b5bf1fc7a33c39c45fec3639ff (patch)
tree985d915939c7b52da7bab6870656942345f3aa35 /emacs
parent59f4a04e7a8bebb90e76397557f3c8ac6c41be36 (diff)
downloaddotfiles-aa93f3d2d24028b5bf1fc7a33c39c45fec3639ff.tar.gz
dotfiles-aa93f3d2d24028b5bf1fc7a33c39c45fec3639ff.zip
Combine all key bindings
Diffstat (limited to 'emacs')
-rw-r--r--emacs/loader.org70
1 files changed, 29 insertions, 41 deletions
diff --git a/emacs/loader.org b/emacs/loader.org
index 56685d4..49983f3 100644
--- a/emacs/loader.org
+++ b/emacs/loader.org
@@ -146,13 +146,25 @@ buffer instead.
: t
#+BEGIN_SRC emacs-lisp
- (global-set-key (kbd "M-u") 'upcase-dwim)
- (global-set-key (kbd "M-l") 'downcase-dwim)
- (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 "M-c") #'capitalize-dwim)
+ (global-set-key (kbd "C-c z") #'quick-calc)
+ (global-set-key (kbd "<f5>") #'revert-buffer)
+ (global-set-key (kbd "C-c q") #'y/exit-emacs-client)
+ (global-set-key (kbd "C-c i") #'y/eshell-here)
+ (global-set-key (kbd "C-.") #'other-window)
+ (global-set-key (kbd "C-,") #'prev-window)
+ (global-set-key (kbd "C-`") #'push-mark-no-activate)
+ (global-set-key (kbd "M-`") #'jump-to-mark)
+
+ (global-set-key (kbd "C-c l") #'org-store-link)
+ (global-set-key (kbd "C-c a") #'org-agenda)
+ (global-set-key (kbd "C-c c") #'org-capture)
#+END_SRC
#+RESULTS:
-: capitalize-dwim
+: org-capture
*** Custom modeline
@@ -238,14 +250,6 @@ the file.
#+RESULTS:
: t
-Make it easier to refresh the buffer by setting it to ~<f5>~.
-#+BEGIN_SRC emacs-lisp
- (global-set-key (kbd "<f5>") 'revert-buffer)
-#+END_SRC
-
-#+RESULTS:
-: revert-buffer
-
This stops paren mode with interfering with the modeline.
#+BEGIN_SRC emacs-lisp
(show-paren-mode 'expression)
@@ -325,8 +329,6 @@ Setting up my keybindings
(define-prefix-command 'y-map)
(global-set-key (kbd "C-c y") 'y-map)
- (global-set-key (kbd "C-c q") 'y/exit-emacs-client)
-
(define-key y-map (kbd "s") 'y/swap-windows)
(define-key y-map (kbd "j") 'y/beautify-json)
(define-key y-map (kbd "p") 'password-store-copy)
@@ -346,12 +348,12 @@ programming and looking at source code.
#+END_SRC
#+BEGIN_SRC emacs-lisp
- (set-default-font "Hack-11")
- (setq default-frame-alist '((font . "Hack-11")))
+ (set-default-font "Hack-13")
+ (setq default-frame-alist '((font . "Hack-13")))
#+END_SRC
#+RESULTS:
-: ((font . Hack-11))
+: ((font . Hack-13))
#+BEGIN_SRC emacs-lisp
(use-package eshell
@@ -385,12 +387,12 @@ programming and looking at source code.
(cd dir)
(goto-char (point-max))
(eshell-kill-input)
- (eshell-send-input)))
- (global-set-key (kbd "C-c i") #'y/eshell-here))
+ (eshell-send-input))))
#+END_SRC
#+RESULTS:
: eshell
+
*** Reload
#+BEGIN_SRC emacs-lisp
@@ -497,9 +499,6 @@ Set navigation commands in all the buffers
(interactive)
(other-window -1))
- (global-set-key (kbd "C-.") #'other-window)
- (global-set-key (kbd "C-,") #'prev-window)
-
(use-package golden-ratio
:config
(golden-ratio-mode))
@@ -511,15 +510,11 @@ Set navigation commands in all the buffers
(push-mark (point) t nil)
(message "Pushed mark to ring"))
- (global-set-key (kbd "C-`") 'push-mark-no-activate)
-
(defun jump-to-mark ()
"Jumps to the local mark, respecting the `mark-ring' order.
This is the same as using \\[set-mark-command] with the prefix argument."
(interactive)
(set-mark-command 1))
-
- (global-set-key (kbd "M-`") 'jump-to-mark)
#+END_SRC
#+RESULTS:
@@ -681,7 +676,6 @@ incrementally selecting more and more of the text.
(use-package flyspell
:ensure nil
:hook
- (prog-mode . flyspell-prog-mode)
(text-mode . flyspell-mode)
:init
(setq ispell-dictionary "en_GB")
@@ -758,28 +752,22 @@ Agenda setup for org mode, pointing to the write files.
org-format-latex-options (plist-put org-format-latex-options :scale 1.5)
org-latex-pdf-process (list "latexmk -shell-escape -bibtex -f -pdf %f")
org-default-notes-file (concat org-directory "/inbox.org")
- org-image-actual-width nil)
+ org-image-actual-width nil
+ org-export-allow-bind-keywords t)
(eval-after-load "org"
'(setq org-metaup-hook nil
org-metadown-hook nil))
(add-hook 'org-trigger-hook 'save-buffer)
-#+END_SRC
-#+RESULTS:
-| save-buffer |
-Set global keys for org mode to access agenda.
-
-#+BEGIN_SRC emacs-lisp
- (global-set-key (kbd "C-c l") 'org-store-link)
- (global-set-key (kbd "C-c a") 'org-agenda)
- (global-set-key (kbd "C-c c") 'org-capture)
+ (use-package ox-taskjuggler
+ :ensure nil)
#+END_SRC
#+RESULTS:
-: org-capture
+| save-buffer |
Set up ob for executing code blocks
@@ -1074,7 +1062,7 @@ F# mode for uni work.
Haskell mode with company mode completion.
#+BEGIN_SRC emacs-lisp
- (defun y/haskell-align (start end)
+ (defun y/haskell-align-comment (start end)
(interactive "r")
(align-regexp start end "\\(\\s-*\\)--"))
@@ -1084,8 +1072,8 @@ Haskell mode with company mode completion.
:config
(add-hook 'haskell-mode-hook 'haskell-decl-scan-mode)
(add-hook 'haskell-mode-hook (lambda ()
- (local-set-key (kbd "C-c a") 'y/haskell-align)))
- (setq haskell-mode-stylish-haskell-path "/home/yannherklotz/.local/bin/stylish-haskell"
+ (local-set-key (kbd "C-c a") 'y/haskell-align-comment)))
+ (setq ;;haskell-mode-stylish-haskell-path "brittany"
haskell-stylish-on-save t
flycheck-ghc-language-extensions '("OverloadedStrings")))