Formatierung, Which-Key und Helm-Descbinds

This commit is contained in:
2020-12-27 13:52:15 +01:00
parent d1be362230
commit 6cea656501

View File

@@ -135,7 +135,7 @@
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun artr/adjust-font-size (height) (defun artr/adjust-font-size (height)
"Adjust font size by given height. If height is '0', reset font "Adjust font size by given height. If height is '0', reset font
size. This function also handles icons and modeline font sizes." size. This function also handles icons and modeline font sizes."
(interactive "nHeight ('0' to reset): ") (interactive "nHeight ('0' to reset): ")
(let ((new-height (if (zerop height) (let ((new-height (if (zerop height)
artr/default-font-size artr/default-font-size
@@ -373,6 +373,11 @@ size. This function also handles icons and modeline font sizes."
("jp" . helm-swoop-back-to-last-point) ("jp" . helm-swoop-back-to-last-point)
:init :init
(bind-key "M-m" 'helm-swoop-from-isearch isearch-mode-map)) (bind-key "M-m" 'helm-swoop-from-isearch isearch-mode-map))
(use-package helm-descbinds
:init
(setq helm-descbinds-window-style 'split-window)
:bind ("C-h b" . helm-descbinds))
#+END_SRC #+END_SRC
* Dateien und Buffer * Dateien und Buffer
@@ -425,15 +430,56 @@ size. This function also handles icons and modeline font sizes."
* Text * Text
** Textbreite ** Textbreite
Der Text wird nach 90 Zeichen umgebrochen. Jedoch nur in der Ansicht!
[[https://github.com/luisgerhorst/virtual-auto-fill][virtual-auto-fill]] - display unfilled text in a readable way
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq-default fill-column 90) (setq-default fill-column 90)
(setq column-number-mode t) (setq column-number-mode t)
(use-package virtual-auto-fill
:hook (text-mode . virtual-auto-fill-mode))
#+END_SRC #+END_SRC
* Snippets
** Whitespace
#+BEGIN_SRC emacs-lisp
(use-package whitespace
:hook (before-save . whitespace-cleanup))
(setq-default sentence-end-double-space nil)
#+END_SRC
** Tabulators
#+BEGIN_SRC emacs-lisp
(setq-default
indent-tabs-mode nil ; Use spaces instead of tabs
tab-width 4)
#+END_SRC
** Copy/Paste
#+BEGIN_SRC emacs-lisp
(delete-selection-mode)
#+END_SRC
** Klammern
#+BEGIN_SRC emacs-lisp
(electric-pair-mode)
(show-paren-mode 1)
(use-package rainbow-delimiters
:hook
(prog-mode . rainbow-delimiters-mode))
#+END_SRC
* Completion
** Company
#+BEGIN_SRC emacs-lisp
(use-package company
:bind ("M-/" . company-complete)
:hook (after-init . global-company-mode)
:init (setq company-idle-delay 0))
(use-package helm-company
:after company helm
:bind (:map company-mode-map
("C-:" . helm-company)
:map company-active-map
("C-:" . helm-company)))
#+END_SRC
** Snippets
Mit Yasnippet lassen sich Templates definieren und mit einer Tastenkombination belegen. Mit Yasnippet lassen sich Templates definieren und mit einer Tastenkombination belegen.
Die Templates werden im Ordner /snippets/ jeweils unter einem Mode-spezifischen Ordner gespeichert. Die Templates werden im Ordner /snippets/ jeweils unter einem Mode-spezifischen Ordner gespeichert.
@@ -458,20 +504,7 @@ size. This function also handles icons and modeline font sizes."
(use-package helm-c-yasnippet (use-package helm-c-yasnippet
:bind (("C-c y" . helm-yas-complete))) :bind (("C-c y" . helm-yas-complete)))
#+END_SRC #+END_SRC
* Completion
#+BEGIN_SRC emacs-lisp
(use-package company
:bind ("M-/" . company-complete)
:hook (after-init . global-company-mode)
:init (setq company-idle-delay 0))
(use-package helm-company
:after company helm
:bind (:map company-mode-map
("C-:" . helm-company)
:map company-active-map
("C-:" . helm-company)))
#+END_SRC
* Projectile * Projectile
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package projectile (use-package projectile
@@ -482,8 +515,10 @@ size. This function also handles icons and modeline font sizes."
:init :init
(setq projectile-completion-system 'helm)) (setq projectile-completion-system 'helm))
#+END_SRC #+END_SRC
* Whitespace
* Which-Key
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package whitespace (use-package which-key
:hook (before-save . whitespace-cleanup)) :init
(which-key-mode))
#+END_SRC #+END_SRC