From 6bdf6db3b453cff3a3f46f1b8f33cac6426f98ac Mon Sep 17 00:00:00 2001 From: dx Date: Wed, 15 Jul 2020 15:56:08 +0100 Subject: ~~/.doom.d -> ~/.config/doom --- .../doom/modules/private/bindings/README.org | 158 +++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 Doom/.config/doom/modules/private/bindings/README.org (limited to 'Doom/.config/doom/modules/private/bindings') diff --git a/Doom/.config/doom/modules/private/bindings/README.org b/Doom/.config/doom/modules/private/bindings/README.org new file mode 100644 index 0000000..90d1b55 --- /dev/null +++ b/Doom/.config/doom/modules/private/bindings/README.org @@ -0,0 +1,158 @@ +#+TITLE: private/bindings Literate configuration +#+PROPERTY: header-args(elisp) :tangle config.el + +* Introduction +This is the main document for this module (=private/bindings=). +To compile, simply execute the source code block below +#+BEGIN_SRC elisp :tangle no +(org-babel-tangle-file "README.org" "config.el") +#+END_SRC +* Initial +#+BEGIN_SRC elisp +;;; private/bindings/config.el -*- lexical-binding: t; -*- +#+END_SRC +* Leader +Bindings for the leader map +** Single binds +These are immediate bindings to the leader map that instantly launch functions when pressed. +This binding space is reserved for stuff I use quite often. +#+BEGIN_SRC elisp +(map! + :leader + "SPC" #'execute-extended-command + "!" #'async-shell-command + "T" #'eshell + "-" #'dired-jump + "_" #'dired-jump-other-window + ";" #'eval-expression + "h" #'help-command + "w" #'ace-window) +#+END_SRC +** Files +#+BEGIN_SRC elisp +(map! + :leader + :prefix "f" + "r" #'counsel-recentf + "f" #'find-file + "p" #'(lambda () (interactive) (doom-project-find-file "~/Dotfiles")) + "s" #'save-buffer + "d" #'dired) +#+END_SRC +** Buffers +#+BEGIN_SRC elisp +(map! + :leader + :prefix "b" + "n" #'next-buffer + "p" #'previous-buffer + "d" #'kill-current-buffer + "b" #'switch-to-buffer + "i" #'ibuffer) +#+END_SRC +** Search +#+BEGIN_SRC elisp +(map! + :leader + :prefix "s" + "i" #'imenu + "o" #'+lookup/online + (:after counsel + "s" #'swiper + "r" #'counsel-rg) + (:after counsel-etags + "t" #'counsel-etags-find-tag)) +#+END_SRC +** Projectile +#+BEGIN_SRC elisp +(map! + :leader + :after projectile + :desc "Switch to p-buffer" ">" #'projectile-switch-to-buffer + :desc "Projects" "p" #'projectile-switch-project + (:prefix ("p" . "project") + :desc "Regen tags" "g" #'projectile-regenerate-tags + :desc "Open project files" "f" #'projectile-find-file)) +#+END_SRC +** Code +#+BEGIN_SRC elisp +(map! + :leader + :prefix ("c" . "code") ; Code + :desc "Compile" "c" #'compile + :desc "Compile via make" "m" #'+make/run + :desc "Undo tree" "u" #'undo-tree-visualize + (:after lsp + :desc "Format code lsp" "f" #'+default/lsp-format-region-or-buffer + :desc "Execute action" "a" #'lsp-execute-code-action)) +#+END_SRC +** Magit and VC +#+BEGIN_SRC elisp +(map! + :leader + :prefix "g" + "g" #'magit-status + "c" #'magit-clone + "f" #'magit-fetch + "p" #'magit-pull) +#+END_SRC +** Notes +#+BEGIN_SRC elisp +(map! + :leader + :prefix ("n" . "notes") + :desc "Open notes in dired" "-" #'(lambda () (interactive) (dired org-directory)) + :desc "Open quicknotes" "q" #'(lambda () (interactive) (find-file (format "%s/qnotes.org" org-directory)))) +#+END_SRC +** Frames +#+BEGIN_SRC elisp +(map! + :leader + :prefix "F" + "d" #'delete-frame) +#+END_SRC +* Company +#+BEGIN_SRC elisp +(map! + :after company + :map company-active-map + "C-j" #'company-select-next + "C-k" #'company-select-previous + "C-SPC" #'company-complete) +#+END_SRC +* Multi cursors +Setup bindings for multi cursors. +As it's a motion based system, use the "gz" namespace. +#+BEGIN_SRC elisp +(map! + :prefix "g" + (:prefix "z" + "m" #'evil-mc-resume-cursors + "p" #'evil-mc-pause-cursors + "d" #'evil-mc-make-all-cursors + "j" #'evil-mc-make-cursor-move-next-line + "k" #'evil-mc-make-cursor-move-prev-line + "z" #'evil-mc-make-cursor-at-pos)) +#+END_SRC +* Quit +Quit Emacs or restart it +#+BEGIN_SRC elisp +(map! + :prefix "q" + "q" #'save-buffers-kill-terminal + "r" #'doom/restart) +#+END_SRC +* Remaps +#+BEGIN_SRC elisp +(define-key! + [remap org-goto] #'counsel-org-goto) +#+END_SRC +* Misc +Misc bindings that don't fit to any other category. +#+BEGIN_SRC elisp +(map! + "C-x C-z" #'text-scale-adjust + "TAB" #'evil-jump-item + "M-c" #'count-words-region + "M-s" #'occur) +#+END_SRC -- cgit v1.2.3-13-gbd6f