From ac67ffdaee6618ec5959964a04b9358ec669456a Mon Sep 17 00:00:00 2001 From: random Date: Fri, 28 Jan 2022 06:09:02 -0800 Subject: [PATCH] more emacs config --- emacs/config.org | 50 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/emacs/config.org b/emacs/config.org index f9b7dc8..6789c00 100644 --- a/emacs/config.org +++ b/emacs/config.org @@ -58,6 +58,21 @@ This moves the backup files so that emacs doesn't clutter up directories with ba #+end_src +** Time Startup + +This function times the startup to tell you how long it took for the emacs config to load. + +#+begin_src emacs-lisp +(defun efs/display-startup-time () + (message "Emacs loaded in %s with %d garbage collections." + (format "%.2f seconds" + (float-time + (time-subtract after-init-time before-init-time))) + gcs-done)) + +(add-hook 'emacs-startup-hook #'efs/display-startup-time) +#+end_src + * Packages Emacs and packages. Pretty much a requirement. @@ -90,6 +105,8 @@ Install use package for easier installation of other packages. (setq use-package-always-ensure t) #+end_src +Fixes path issue that occurs on mac. + #+begin_src emacs-lisp (use-package exec-path-from-shell :config @@ -107,6 +124,7 @@ Command Log Mode creates a window that logs all commands and corrosponding keybi #+begin_src emacs-lisp (use-package command-log-mode + :defer :config (global-command-log-mode)) #+end_src @@ -310,7 +328,7 @@ Undo tree's use is self explanitory. While the built-in emacs undo system is fin Hydra is a package that implements a way to execute the same commands in quick succession. #+begin_src emacs-lisp - (use-package hydra) + (use-package hydra :defer) #+end_src Setup easy changing of font size. This implements a zooming system to make text smaller or bigger quickly. @@ -354,7 +372,7 @@ Dired is a built-in package in emacs that allows for basic file navigation. Whil Vanilla dired opens a new buffer for every new directory it visits. When managing files, this will quickly fill up resulting in a rediculous number of buffers. Though, single dired fixes this problem by instead modifying the current buffer when navigating through files. #+begin_src emacs-lisp - (use-package dired-single) + (use-package dired-single :after dired) #+end_src ** All the Icons Dired @@ -363,6 +381,7 @@ Vanilla dired opens a new buffer for every new directory it visits. When managin #+begin_src emacs-lisp (use-package all-the-icons-dired + :after dired :hook (dired-mode . all-the-icons-dired-mode)) #+end_src @@ -472,6 +491,7 @@ Visual fill column is a package that allows you to center text and add borders t (visual-fill-column-mode 1)) (use-package visual-fill-column + :after org :hook (org-mode . jm/org-mode-visual-fill)) #+end_src @@ -483,16 +503,6 @@ This is required as of org 9.2 as snippets such as ~