mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
Turned all swap and resize window keybindings into functions.
When they were called with lambda they'd cause delete-selection-mode to stop working every now and then. Don't know why, but at least this fixes it.
This commit is contained in:
15
helpers.el
15
helpers.el
@@ -67,6 +67,16 @@
|
||||
(other-window -1))
|
||||
|
||||
|
||||
;;
|
||||
;; Window Resizing
|
||||
;;
|
||||
|
||||
(defun enlarge-window-down () (interactive) (enlarge-window 1))
|
||||
(defun enlarge-window-up () (interactive) (enlarge-window -1))
|
||||
(defun enlarge-window-left () (interactive) (enlarge-window -1 t))
|
||||
(defun enlarge-window-right () (interactive) (enlarge-window 1 t))
|
||||
|
||||
|
||||
;;
|
||||
;; Window Swapping
|
||||
;; - from https://gist.github.com/287633
|
||||
@@ -86,6 +96,11 @@
|
||||
(set-window-start this-window other-start)
|
||||
(set-window-start other-window this-start)))))
|
||||
|
||||
(defun swap-with-down () (interactive) (swap-with 'down))
|
||||
(defun swap-with-up () (interactive) (swap-with 'up))
|
||||
(defun swap-with-left () (interactive) (swap-with 'left))
|
||||
(defun swap-with-right () (interactive) (swap-with 'right))
|
||||
|
||||
;;
|
||||
;; Transparency
|
||||
;;
|
||||
|
||||
@@ -55,15 +55,15 @@
|
||||
(global-set-key (kbd "C->") 'transparency-decrease)
|
||||
|
||||
;; Window Tiling (via helpers.el)
|
||||
(global-set-key (kbd "C-M-K") (lambda () (interactive) (swap-with 'down)))
|
||||
(global-set-key (kbd "C-M-I") (lambda () (interactive) (swap-with 'up)))
|
||||
(global-set-key (kbd "C-M-J") (lambda () (interactive) (swap-with 'left)))
|
||||
(global-set-key (kbd "C-M-L") (lambda () (interactive) (swap-with 'right)))
|
||||
(global-set-key (kbd "C-M-K") 'swap-with-down)
|
||||
(global-set-key (kbd "C-M-I") 'swap-with-up)
|
||||
(global-set-key (kbd "C-M-J") 'swap-with-left)
|
||||
(global-set-key (kbd "C-M-L") 'swap-with-right)
|
||||
|
||||
(global-set-key (kbd "M-K") (lambda () (interactive) (enlarge-window 1)))
|
||||
(global-set-key (kbd "M-I") (lambda () (interactive) (enlarge-window -1)))
|
||||
(global-set-key (kbd "M-J") (lambda () (interactive) (enlarge-window -1 t)))
|
||||
(global-set-key (kbd "M-L") (lambda () (interactive) (enlarge-window 1 t)))
|
||||
(global-set-key (kbd "M-K") 'enlarge-window-down)
|
||||
(global-set-key (kbd "M-I") 'enlarge-window-up)
|
||||
(global-set-key (kbd "M-J") 'enlarge-window-left)
|
||||
(global-set-key (kbd "M-L") 'enlarge-window-right)
|
||||
|
||||
(global-set-key (kbd "M-k") 'windmove-down)
|
||||
(global-set-key (kbd "M-i") 'windmove-up)
|
||||
|
||||
Reference in New Issue
Block a user