+;;; init-windows.el --- Customization pertaining to windows
+
+;;; Commentary:
 ;; https://github.com/purcell/emacs.d/blob/8208151ab23cdcaa7b1027d16d8bd108a3b0dfd6/lisp/init-windows.el
+
+;;; Code:
+
+(require 'init-elpa)
+
+(require-package 'winner)
+(require 'winner)
 
 ;;----------------------------------------------------------------------------
 ;; Navigate window layouts with "C-c <left>" and "C-c <right>"
 ;;----------------------------------------------------------------------------
 (winner-mode 1)
-
 
 
 ;; Make "C-x o" prompt for a target window when there are more than 2

;; Rearrange split windows
;;----------------------------------------------------------------------------
(defun split-window-horizontally-instead ()
  (interactive)
  (save-excursion
    (delete-other-windows)
    (funcall (split-window-func-with-other-buffer 'split-window-horizontally))))

(defun split-window-vertically-instead ()
  (interactive)
  (save-excursion
    (delete-other-windows)

(global-set-key (kbd "C-x o") 'switch-window)


(defun split-window-func-with-other-buffer (split-function)
  "When splitting window (via `SPLIT-FUNCTION'), show (other-buffer) in the new window."
  (lexical-let ((s-f split-function))
    (lambda ()
      (interactive)
