commit 724698d6d66454cafcaf23169a9f7dbe76384360
parent e738420419beed2e0997d274777270104c22aa95
Author: dwrz <dwrz@dwrz.net>
Date: Sun, 9 Jul 2023 00:43:40 +0000
Refactor namespace personal emacs functions
Diffstat:
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/emacs/init.el b/emacs/init.el
@@ -51,8 +51,12 @@
(when filename (kill-new filename)
(message "Copied buffer name '%s' to the clipboard." filename)))))
+(defun dwrz-org-capture-at-point ()
+ "Insert an org capture template at point."
+ (interactive)
+ (org-capture 0))
-(defun shell-in-current-directory ()
+(defun dwrz-shell-in-current-directory ()
"Create or switch to a shell buffer for the current directory."
(interactive)
(let* ((default-directory (if (buffer-file-name)
@@ -65,17 +69,12 @@
(switch-to-buffer existing-shell-buffer)
(shell (generate-new-buffer-name shell-buffer-name)))))
-(defun split-window-two-thirds ()
+(defun dwrz-split-window-two-thirds ()
"Split the current window into two, with a 2/3 and 1/3 vertical split."
(interactive)
(select-window (split-window-vertically
(floor (* 0.666 (window-total-height))))))
-(defun dwrz-org-capture-at-point ()
- "Insert an org capture template at point."
- (interactive)
- (org-capture 0))
-
(defun dwrz-unfill-paragraph ()
"Unfill a paragraph."
(interactive)
@@ -594,11 +593,11 @@
(global-set-key (kbd "C-h v") 'counsel-describe-variable)
(global-set-key (kbd "C-r") 'counsel-rg)
(global-set-key (kbd "C-s") 'swiper)
-(global-set-key (kbd "C-x 9") 'split-window-two-thirds)
+(global-set-key (kbd "C-x 9") 'dwrz-split-window-two-thirds)
(global-set-key (kbd "C-x C-b") 'ibuffer)
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
(global-set-key (kbd "C-x b") 'ivy-switch-buffer)
(global-set-key (kbd "C-x g") 'magit-status)
(global-set-key (kbd "C-x m") 'notmuch)
-(global-set-key (kbd "C-x t") 'shell-in-current-directory)
+(global-set-key (kbd "C-x t") 'dwrz-shell-in-current-directory)
(global-set-key (kbd "M-x") 'counsel-M-x)