Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (33 sloc) 1.77 KB
;; emacsd-tile.el -- tiling windows for emacs
;; (defun swap-with (dir)
;; (interactive)
;; (let ((other-window (windmove-find-other-window dir)))
;; (when other-window
;; (let* ((this-window (selected-window))
;; (this-buffer (window-buffer this-window))
;; (other-buffer (window-buffer other-window))
;; (this-start (window-start this-window))
;; (other-start (window-start other-window)))
;; (set-window-buffer this-window other-buffer)
;; (set-window-buffer other-window this-buffer)
;; (set-window-start this-window other-start)
;; (set-window-start other-window this-start)))))
;; (global-set-key (kbd "C-M-J") (lambda () (interactive) (swap-with 'down)))
;; (global-set-key (kbd "C-M-K") (lambda () (interactive) (swap-with 'up)))
;; (global-set-key (kbd "C-M-H") (lambda () (interactive) (swap-with 'left)))
;; (global-set-key (kbd "C-M-L") (lambda () (interactive) (swap-with 'right)))
;; (global-set-key (kbd "M-J") (lambda () (interactive) (enlarge-window 1)))
;; (global-set-key (kbd "M-K") (lambda () (interactive) (enlarge-window -1)))
;; (global-set-key (kbd "M-H") (lambda () (interactive) (enlarge-window -1 t)))
;; (global-set-key (kbd "M-L") (lambda () (interactive) (enlarge-window 1 t)))
;; (global-set-key (kbd "M-j") 'windmove-down)
;; (global-set-key (kbd "M-k") 'windmove-up)
;; (global-set-key (kbd "M-h") 'windmove-left)
;; (global-set-key (kbd "M-l") 'windmove-right)
;; Winner-mode
(winner-mode t)
(global-set-key (kbd "C-c wf") 'winner-redo)
(global-set-key (kbd "C-c wb") 'winner-undo)
(global-set-key (kbd "C-M-j") '(lambda () (interactive) (other-window 1)))
(global-set-key (kbd "C-M-k") '(lambda () (interactive) (other-window -1)))
(provide 'arvid-windows)