From c5c44c99130385d585c5aaf5bb11dbb09000d0a4 Mon Sep 17 00:00:00 2001 From: Christopher James Hayward Date: Sun, 16 May 2021 12:20:16 -0400 Subject: [PATCH] Fix switch-to-buffer keys --- modules/keys.org | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/modules/keys.org b/modules/keys.org index f46fd33..77ff6e5 100644 --- a/modules/keys.org +++ b/modules/keys.org @@ -63,8 +63,23 @@ Implement some shortcut bindings, with a significant portion of them cherry pick #+begin_src emacs-lisp (dotfiles/leader "." '(find-file :which-key "Files") - "," '(switch-buffer :which-key "Buffers") - "c" '(kill-buffer-and-window :which-key "Close")) + "," '(switch-to-buffer :which-key "Buffers")) +#+end_src + +** Quitting Emacs + +Customize the behaviour of exiting emacs, with keybindings behind =SPC q=: + ++ Save and quit =q= ++ Quit without saving =w= ++ Exit the Frame (daemon) =f= + +#+begin_src emacs-lisp +(dotfiles/leader + "q" '(:ignore t :which-key "Quit") + "qq" '(save-buffers-kill-emacs :which-key "Save") + "qw" '(kill-emacs :which-key "Now") + "qf" '(delete-frame :which-key "Frame")) #+end_src ** Managing windows @@ -73,6 +88,7 @@ Screen space is divided into Frames inside of Emacs, manage them behind =SPC w=: + Swap with =w= + Close with =c= ++ Delete with =d= + Move with =h,j,k,l= + Split with =s - = @@ -80,7 +96,8 @@ Screen space is divided into Frames inside of Emacs, manage them behind =SPC w=: (dotfiles/leader "w" '(:ignore t :which-key "Window") "ww" '(window-swap-states :which-key "Swap") - "wc" '(delete-window :which-key "Close") + "wc" '(kill-buffer-and-window :which-key "Close") + "wd" '(delete-window :which-key "Close") "wh" '(windmove-left :which-key "Left") "wj" '(windmove-down :which-key "Down") "wk" '(windmove-up :which-key "Up") @@ -90,23 +107,6 @@ Screen space is divided into Frames inside of Emacs, manage them behind =SPC w=: "wsl" '(split-window-right :which-key "Right")) #+end_src - -** Quitting Emacs - -Customize the behaviour of exiting emacs, with keybindings behind =SPC q=: - -+ Save and quit =q= -+ Quit without saving =w= -+ Exit the Frame (daemon) =f= - -#+begin_src emacs-lisp -(dotfiles/leader - "q" '(:ignore t :which-key "Quit") - "qq" '(save-buffers-kill-emacs :which-key "Save") - "qw" '(kill-emacs :which-key "Now") - "qf" '(delete-frame :which-key "Frame")) -#+end_src - ** Helper Functions Use the built-in ~describe-*~ functionality of Emacs to quickly access documentation for packages, variables, and functions. Run helper functions with =SPC h=: