prefix custom funcs
This commit is contained in:
parent
d7f1b51e62
commit
919186ea6b
1 changed files with 11 additions and 11 deletions
22
init.el
22
init.el
|
@ -225,7 +225,7 @@
|
|||
"'" '(iterm-focus :which-key "iterm")
|
||||
"?" '(iterm-goto-filedir-or-home :which-key "iterm - goto dir")
|
||||
"/" 'counsel-ag
|
||||
"TAB" '(switch-to-last-buffer :which-key "prev buffer")
|
||||
"TAB" '(foo/switch-to-last-buffer :which-key "prev buffer")
|
||||
|
||||
;; Applications
|
||||
"a" '(:ignore t :which-key "Applications")
|
||||
|
@ -238,15 +238,15 @@
|
|||
"bd" 'evil-delete-buffer
|
||||
"bn" 'next-buffer
|
||||
"bn" 'next-buffer
|
||||
"bs" 'switch-to-scratch-buffer
|
||||
"bs" 'foo/switch-to-scratch-buffer
|
||||
|
||||
;; Files
|
||||
"ff" 'counsel-find-file
|
||||
"fL" 'counsel-locate
|
||||
"fr" 'counsel-recentf
|
||||
"fR" 'rename-current-buffer-file
|
||||
"fD" 'delete-current-buffer-file
|
||||
"fc" 'copy-file'
|
||||
"fR" 'foo/rename-current-buffer-file
|
||||
"fD" 'foo/delete-current-buffer-file
|
||||
"fc" 'foo/copy-file'
|
||||
|
||||
;; Git
|
||||
"g" '(:ignore t :which-key "Magit")
|
||||
|
@ -300,7 +300,7 @@
|
|||
"w <left>" 'evil-window-left
|
||||
"wL" 'evil-window-move-far-right
|
||||
"wl" 'evil-window-right
|
||||
"wm" 'toggle-maximize-buffer
|
||||
"wm" 'foo/toggle-maximize-buffer
|
||||
"wo" 'other-frame
|
||||
"w <right>" 'evil-window-right
|
||||
"w <S-down>" 'evil-window-move-very-bottom
|
||||
|
@ -323,7 +323,7 @@
|
|||
))
|
||||
|
||||
;; custom functions
|
||||
(defun toggle-maximize-buffer () "Maximize buffer."
|
||||
(defun foo/toggle-maximize-buffer () "Maximize buffer."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(if (and (= 1 (length (window-list)))
|
||||
|
@ -333,7 +333,7 @@
|
|||
(window-configuration-to-register ?_)
|
||||
(delete-other-windows)))))
|
||||
|
||||
(defun switch-to-scratch-buffer (&optional arg)
|
||||
(defun foo/switch-to-scratch-buffer (&optional arg)
|
||||
"Switch to the `*scratch*' buffer, creating it first if needed.
|
||||
if prefix argument ARG is given, switch to it in an other, possibly new window."
|
||||
(interactive "P")
|
||||
|
@ -342,12 +342,12 @@ if prefix argument ARG is given, switch to it in an other, possibly new window."
|
|||
(switch-to-buffer-other-window (get-buffer-create "*scratch*"))
|
||||
(switch-to-buffer (get-buffer-create "*scratch*")))))
|
||||
|
||||
(defun switch-to-last-buffer ()
|
||||
(defun foo/switch-to-last-buffer ()
|
||||
"Switch to the last buffer, allowes quick jumping between the last two."
|
||||
(interactive)
|
||||
(switch-to-buffer nil))
|
||||
|
||||
(defun delete-current-buffer-file ()
|
||||
(defun foo/delete-current-buffer-file ()
|
||||
"Remove file connected to current buffer and kill buffer."
|
||||
(interactive)
|
||||
(let ((filename (buffer-file-name))
|
||||
|
@ -427,7 +427,7 @@ initialized with the current directory instead of filename."
|
|||
;; ?\a = C-g, ?\e = Esc and C-[
|
||||
((memq key '(?\a ?\e)) (keyboard-quit))))))))
|
||||
|
||||
(defun copy-file ()
|
||||
(defun foo/copy-file ()
|
||||
"Write the file under new name."
|
||||
(interactive)
|
||||
(call-interactively 'write-file))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue