emacs: Neustart und Konfigurationsdatei
This commit is contained in:
38
config.org
38
config.org
@@ -47,3 +47,41 @@
|
|||||||
(setq backup-directory-alist `((".*" . ,temporary-file-directory)))
|
(setq backup-directory-alist `((".*" . ,temporary-file-directory)))
|
||||||
(setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))
|
(setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
* Konfigurationsdatei
|
||||||
|
** Konfigurationsdatei
|
||||||
|
Ich bastel sehr gerne an meiner Konfigurationsdatei herum. Mit <f1> kann ich sie ganz schnell öffnen und mit <f2> neu laden.
|
||||||
|
| Key | Funktion |
|
||||||
|
|-----+----------------------------------------------|
|
||||||
|
| F1 | Öffne Konfigurationsdatei in anderem Fenster |
|
||||||
|
| F2 | Konfiguration neu laden, ohne Emacs-Neustart |
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
;; Pfade
|
||||||
|
(setq my/file-init (expand-file-name "init.el" user-emacs-directory))
|
||||||
|
(setq my/file-config (expand-file-name "config.org" user-emacs-directory))
|
||||||
|
;; Öffnen
|
||||||
|
(defun my/find-config-file ()
|
||||||
|
"Edit my init file in another window."
|
||||||
|
(interactive)
|
||||||
|
(find-file my/file-config))
|
||||||
|
;; Laden
|
||||||
|
(defun my/reload-emacs-configuration ()
|
||||||
|
"Reload init.el"
|
||||||
|
(interactive)
|
||||||
|
(load-file my/file-init))
|
||||||
|
;; Keys
|
||||||
|
(global-set-key (kbd "<f1>") 'my/find-config-file)
|
||||||
|
(global-set-key (kbd "<f2>") 'my/reload-emacs-configuration)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Neustart
|
||||||
|
Mit <F12> kann ich Emacs neu starten.
|
||||||
|
| Key | Funktion |
|
||||||
|
|-----+----------------|
|
||||||
|
| F12 | Emacs-Neustart |
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package restart-emacs
|
||||||
|
:ensure t
|
||||||
|
:bind ("<f12>" . 'restart-emacs))
|
||||||
|
#+END_SRC
|
||||||
|
|||||||
Reference in New Issue
Block a user