aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2019-09-18 11:07:46 -0700
committerGravatar Tom Willemse2019-09-18 11:07:46 -0700
commitdb0220de5c1ac7db47d47322ce4dfa6c90e9bd51 (patch)
treea865b34401965502c49b2abeddcea251f43c1908
parent298241a2d5e33d2d2c7ba22ae8418155fe42a1a6 (diff)
downloademacs-config-db0220de5c1ac7db47d47322ce4dfa6c90e9bd51.tar.gz
emacs-config-db0220de5c1ac7db47d47322ce4dfa6c90e9bd51.zip
Add some layout management commands
After watching a YouTube video[1] on managing window layouts in Emacs I was reminded of ‘winner-mode’ and introduced to the ‘ivy-push-view’ and ‘ivy-switch-view’ commands. As I feel like I frequently end up with setting up and losing layouts, I think these may be useful. [1]: https://www.youtube.com/watch?v=kyllrQiNsyA
-rw-r--r--oni-core.el6
-rw-r--r--oni-ivy.el5
2 files changed, 9 insertions, 2 deletions
diff --git a/oni-core.el b/oni-core.el
index d97617e..acb7d13 100644
--- a/oni-core.el
+++ b/oni-core.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2019.0908.172557
+;; Version: 2019.0918.110728
;; Package-Requires: (oni-data-dir expand-region multiple-cursors embrace helpful)
;; This program is free software; you can redistribute it and/or modify
@@ -100,7 +100,11 @@
(global-set-key [remap describe-variable] 'helpful-variable)
(global-set-key (kbd "C-c C-d") 'helpful-at-point)
+(global-set-key (kbd "C-<left>") 'winner-undo)
+(global-set-key (kbd "C-<right>") 'winner-redo)
+
(electric-indent-mode -1)
+(winner-mode)
(add-to-list 'display-buffer-alist
'("\\`\\*help" display-buffer-in-side-window
diff --git a/oni-ivy.el b/oni-ivy.el
index b7022d7..81f6abc 100644
--- a/oni-ivy.el
+++ b/oni-ivy.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2019.0904.210630
+;; Version: 2019.0918.110642
;; Package-Requires: (ivy ivy-hydra diminish ivy-posframe)
;; This program is free software; you can redistribute it and/or modify
@@ -46,6 +46,9 @@
(add-function :around (symbol-function 'grep-read-files)
#'oni-ivy--disable)))
+(global-set-key (kbd "C-<up>") 'ivy-push-view)
+(global-set-key (kbd "C-<down>") 'ivy-switch-view)
+
;;;###autoload
(add-hook 'emacs-startup-hook 'ivy-mode)