feat(emacs): add better window manipulation commands
Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
parent
99d9a27cce
commit
c7862baf18
2 changed files with 37 additions and 1 deletions
|
@ -185,7 +185,6 @@
|
|||
(global-so-long-mode 1)
|
||||
|
||||
(rassq-delete-all 'auto-save-mode auto-mode-alist)
|
||||
(windmove-default-keybindings)
|
||||
(put 'scroll-left 'disabled nil)
|
||||
(put 'scroll-right 'disabled nil)
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
(require 'projectile)
|
||||
(require 'magit)
|
||||
|
||||
;;; Neotree
|
||||
|
||||
(defun neotree-toggle-dir-or-project ()
|
||||
"By default, toggle the directory at the project level, with prefix current."
|
||||
(interactive)
|
||||
|
@ -37,12 +39,47 @@
|
|||
(neotree-hide)
|
||||
(neotree-dir dir)))
|
||||
|
||||
;;; Windmove
|
||||
(defun priime-window-left ()
|
||||
"Move or swap with the left window."
|
||||
(interactive)
|
||||
(if (eq current-prefix-arg nil)
|
||||
(windmove-left)
|
||||
(windmove-swap-states-left)))
|
||||
|
||||
(defun priime-window-right ()
|
||||
"Move or swap with the right window."
|
||||
(interactive)
|
||||
(if (eq current-prefix-arg nil)
|
||||
(windmove-right)
|
||||
(windmove-swap-states-right)))
|
||||
|
||||
(defun priime-window-down ()
|
||||
"Move or swap with the down window."
|
||||
(interactive)
|
||||
(if (eq current-prefix-arg nil)
|
||||
(windmove-down)
|
||||
(windmove-swap-states-down)))
|
||||
|
||||
(defun priime-window-up ()
|
||||
"Move or swap with the up window."
|
||||
(interactive)
|
||||
(if (eq current-prefix-arg nil)
|
||||
(windmove-up)
|
||||
(windmove-swap-states-up)))
|
||||
|
||||
(use-package nano-theme
|
||||
:straight '(nano-theme :type git :host github
|
||||
:repo "rougier/nano-theme")
|
||||
:init
|
||||
(load-theme 'nano t)
|
||||
(nano-light))
|
||||
(use-package windmove :straight nil
|
||||
:init
|
||||
(keymap-global-set "S-<left>" #'priime-window-left)
|
||||
(keymap-global-set "S-<right>" #'priime-window-right)
|
||||
(keymap-global-set "S-<down>" #'priime-window-down)
|
||||
(keymap-global-set "S-<up>" #'priime-window-up))
|
||||
(use-package all-the-icons :straight t)
|
||||
(use-package neotree :straight t
|
||||
:after (all-the-icons)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue