From c6aa6b15653c0f2f98712f00fc4d3cccf04fb9b9 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Fri, 26 Feb 2016 14:05:44 +0100 Subject: [PATCH] adding twist-split - Switch between horizontal and vertical split screen. --- bba.org | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bba.org b/bba.org index e2463b98..744e5f53 100644 --- a/bba.org +++ b/bba.org @@ -1803,6 +1803,18 @@ Bind shift f3 and shift f4 to previous/next frame. (global-set-key (kbd "S-") 'move-cursor-next-frame) #+END_SRC +Right from [[https://gist.github.com/etherald/dcdcf579751c75a2c796][gisthub]]: + +#+BEGIN_SRC emacs-lisp + (defun twist-split () + (interactive) + (setq buffer2 (window-buffer (second (window-list)))) + (if (window-top-child (frame-root-window)) + (progn (delete-other-windows) (split-window-horizontally)) + (progn (delete-other-windows) (split-window-vertically))) + (set-window-buffer (second (window-list)) buffer2)) +#+END_SRC + * [[https://github.com/dotemacs/ipcalc.el][ipcalc]] #+BEGIN_SRC emacs-lisp (require 'ipcalc) -- 2.47.3