 ;; (C-l C-l) scrolls the window so that point is on the topmost screen line.
 ;; Typing a third C-l scrolls the window so that point is on the bottom-most
 ;; screen line. Each successive C-l cycles through these three positions.
-
-;; (global-set-key (kbd "<C-tab>")   'other-window) ;; alternative shortcut for `C-x o`
-;; ;; Cycle the buffers in reverse order than what happens with `C-x o`
-;; (global-set-key (kbd "C-x O")
-;;                 (lambda ()
-;;                   (interactive)
-;;                   (other-window -1)))

    (key-chord-define-global "p[" #'windmove-left)
    (key-chord-define-global "[]" #'windmove-right)))

;; http://emacs.stackexchange.com/a/3334/115
;; Reopen Killed File
(defvar killed-file-list nil
  "List of recently killed files.")


- Do `ediff-buffers' otherwise.

Otherwise call `ediff-buffers' interactively."
      (interactive)
      (if (region-active-p)
          (call-interactively 'ediff-regions-wordwise)
        (if (= 2 (safe-length (window-list)))
            (let (bufa bufb filea fileb)
              (setq bufa  (get-buffer (buffer-name)))
              (setq filea (buffer-file-name bufa))
              (save-excursion
                (other-window 1)
                (setq bufb (get-buffer (buffer-name))))
              (setq fileb (buffer-file-name bufb))
              (if (or
                   ;; if either of the buffers is not associated to a file
                   (null filea) (null fileb)
                   ;; if either of the buffers is modified
                   (buffer-modified-p bufa) (buffer-modified-p bufb))
                  (progn
                    (message "Running (ediff-buffers \"%s\" \"%s\") .." bufa bufb)
                    (ediff-buffers bufa bufb))
                (progn
                  (message "Running (ediff-files \"%s\" \"%s\") .." filea fileb)
                  (ediff-files filea fileb))))
          (call-interactively 'ediff-buffers))))))

(defun modi/set-file-permissions (perm)
  "Change permissions of the file in current buffer.
