+a ton of bindings
Copied from doom that I liked
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
#+TITLE: private/bindings Literate configuration
|
#+TITLE: private/bindings Literate configuration
|
||||||
#+PROPERTY: header-args(elisp) :tangle config.el
|
|
||||||
|
|
||||||
* Introduction
|
* Introduction
|
||||||
This is the main document for this module (=private/bindings=).
|
This is the main document for this module (=private/bindings=).
|
||||||
@@ -25,6 +24,7 @@ This binding space is reserved for stuff I use quite often.
|
|||||||
"SPC" #'execute-extended-command
|
"SPC" #'execute-extended-command
|
||||||
"!" #'async-shell-command
|
"!" #'async-shell-command
|
||||||
"T" #'eshell
|
"T" #'eshell
|
||||||
|
"C" #'calc
|
||||||
"-" #'dired-jump
|
"-" #'dired-jump
|
||||||
"_" #'dired-jump-other-window
|
"_" #'dired-jump-other-window
|
||||||
";" #'eval-expression
|
";" #'eval-expression
|
||||||
@@ -36,9 +36,10 @@ This binding space is reserved for stuff I use quite often.
|
|||||||
(map!
|
(map!
|
||||||
:leader
|
:leader
|
||||||
:prefix "f"
|
:prefix "f"
|
||||||
"r" #'counsel-recentf
|
"r" #'recentf-open-files
|
||||||
|
(:after projectile
|
||||||
|
"p" #'(lambda () (interactive) (doom-project-find-file "~/Dotfiles")))
|
||||||
"f" #'find-file
|
"f" #'find-file
|
||||||
"p" #'(lambda () (interactive) (doom-project-find-file "~/Dotfiles"))
|
|
||||||
"s" #'save-buffer
|
"s" #'save-buffer
|
||||||
"d" #'dired)
|
"d" #'dired)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
@@ -71,11 +72,12 @@ This binding space is reserved for stuff I use quite often.
|
|||||||
(map!
|
(map!
|
||||||
:leader
|
:leader
|
||||||
:after projectile
|
:after projectile
|
||||||
:desc "Switch to p-buffer" ">" #'projectile-switch-to-buffer
|
">" #'projectile-switch-to-buffer
|
||||||
:desc "Projects" "p" #'projectile-switch-project
|
|
||||||
(:prefix ("p" . "project")
|
(:prefix ("p" . "project")
|
||||||
:desc "Regen tags" "g" #'projectile-regenerate-tags
|
"p" #'projectile-switch-project
|
||||||
:desc "Open project files" "f" #'projectile-find-file))
|
"g" #'projectile-regenerate-tags
|
||||||
|
"f" #'projectile-find-file
|
||||||
|
"i" #'projectile-invalidate-cache))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Code
|
** Code
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
@@ -84,6 +86,7 @@ This binding space is reserved for stuff I use quite often.
|
|||||||
:prefix ("c" . "code") ; Code
|
:prefix ("c" . "code") ; Code
|
||||||
:desc "Compile" "c" #'compile
|
:desc "Compile" "c" #'compile
|
||||||
:desc "Compile via make" "m" #'+make/run
|
:desc "Compile via make" "m" #'+make/run
|
||||||
|
:desc "Flycheck" "v" #'flycheck-list-errors
|
||||||
:desc "Undo tree" "u" #'undo-tree-visualize
|
:desc "Undo tree" "u" #'undo-tree-visualize
|
||||||
(:after lsp
|
(:after lsp
|
||||||
:desc "Format code lsp" "f" #'+default/lsp-format-region-or-buffer
|
:desc "Format code lsp" "f" #'+default/lsp-format-region-or-buffer
|
||||||
@@ -93,6 +96,7 @@ This binding space is reserved for stuff I use quite often.
|
|||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(map!
|
(map!
|
||||||
:leader
|
:leader
|
||||||
|
:after magit
|
||||||
:prefix "g"
|
:prefix "g"
|
||||||
"g" #'magit-status
|
"g" #'magit-status
|
||||||
"c" #'magit-clone
|
"c" #'magit-clone
|
||||||
@@ -114,48 +118,71 @@ This binding space is reserved for stuff I use quite often.
|
|||||||
:prefix "F"
|
:prefix "F"
|
||||||
"d" #'delete-frame)
|
"d" #'delete-frame)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
** Toggle
|
||||||
|
Bindings that usually toggle stuff based bindings
|
||||||
|
#+BEGIN_SRC elisp
|
||||||
|
(map!
|
||||||
|
:leader
|
||||||
|
:prefix "t"
|
||||||
|
"s" #'flyspell-mode
|
||||||
|
"f" #'flycheck-mode
|
||||||
|
"t" #'toggle-truncate-lines
|
||||||
|
"l" #'doom/toggle-line-numbers
|
||||||
|
"F" #'toggle-frame-fullscreen)
|
||||||
|
#+END_SRC
|
||||||
|
** Quit
|
||||||
|
Quit Emacs or restart it
|
||||||
|
#+BEGIN_SRC elisp
|
||||||
|
(map!
|
||||||
|
:leader
|
||||||
|
:prefix "q"
|
||||||
|
"q" #'save-buffers-kill-terminal
|
||||||
|
"r" #'doom/restart)
|
||||||
|
#+END_SRC
|
||||||
|
* Ivy
|
||||||
|
Bindings for ivy based functions
|
||||||
|
#+BEGIN_SRC elisp
|
||||||
|
(map!
|
||||||
|
:after ivy
|
||||||
|
:map ivy-minibuffer-map
|
||||||
|
"C-j" #'ivy-next-line-or-history
|
||||||
|
"C-k" #'ivy-previous-line-or-history)
|
||||||
|
#+END_SRC
|
||||||
* Company
|
* Company
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(map!
|
(map!
|
||||||
:after company
|
:i "C-SPC" #'company-complete-common
|
||||||
:map company-active-map
|
:map company-active-map
|
||||||
"C-j" #'company-select-next
|
"C-j" #'company-select-next-or-abort
|
||||||
"C-k" #'company-select-previous
|
"C-k" #'company-select-previous-or-abort)
|
||||||
"C-SPC" #'company-complete)
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Multi cursors
|
* Multi cursors
|
||||||
Setup bindings for multi cursors.
|
Setup bindings for multi cursors.
|
||||||
As it's a motion based system, use the "gz" namespace.
|
As it's a motion based system, use the "gz" namespace.
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(map!
|
(map!
|
||||||
:prefix "g"
|
:after evil
|
||||||
(:prefix "z"
|
:m "gzm" #'evil-mc-resume-cursors
|
||||||
"m" #'evil-mc-resume-cursors
|
:m "gzp" #'evil-mc-pause-cursors
|
||||||
"p" #'evil-mc-pause-cursors
|
:m "gzd" #'evil-mc-make-all-cursors
|
||||||
"d" #'evil-mc-make-all-cursors
|
:m "gzj" #'evil-mc-make-cursor-move-next-line
|
||||||
"j" #'evil-mc-make-cursor-move-next-line
|
:m "gzk" #'evil-mc-make-cursor-move-prev-line
|
||||||
"k" #'evil-mc-make-cursor-move-prev-line
|
:m "gzz" #'evil-mc-make-cursor-here)
|
||||||
"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
|
#+END_SRC
|
||||||
* Remaps
|
* Remaps
|
||||||
|
Remap certain functions to more useful counterparts
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(define-key!
|
(after! org
|
||||||
[remap org-goto] #'counsel-org-goto)
|
(define-key!
|
||||||
|
[remap org-goto] #'imenu))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Misc
|
* Misc
|
||||||
Misc bindings that don't fit to any other category.
|
Misc bindings that don't fit to any other category.
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(map!
|
(map!
|
||||||
"C-x C-z" #'text-scale-adjust
|
"C-x C-z" #'text-scale-adjust
|
||||||
"TAB" #'evil-jump-item
|
(:after evil
|
||||||
|
"TAB" #'evil-jump-item)
|
||||||
"M-c" #'count-words-region
|
"M-c" #'count-words-region
|
||||||
"M-s" #'occur)
|
"M-s" #'occur)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|||||||
Reference in New Issue
Block a user