From: Andreas Gerler Date: Fri, 26 Feb 2016 13:05:44 +0000 (+0100) Subject: adding twist-split X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=c6aa6b15653c0f2f98712f00fc4d3cccf04fb9b9;p=emacsconfig.git adding twist-split - Switch between horizontal and vertical split screen. --- 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)