Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 29 lines (25 sloc) 0.877 kb
6015f80 @bbatsov minor changes
authored
1 ;;; This file is part of the Emacs Dev Kit
2
ad74fe0 massive import from my old config
Bozhidar Batsov authored
3 (defun recentf-ido-find-file ()
4 "Find a recent file using ido."
5 (interactive)
6 (let ((file (ido-completing-read "Choose recent file: " recentf-list nil t)))
7 (when file
8 (find-file file))))
9
10 (defun swap-windows ()
11 "If you have 2 windows, it swaps them."
12 (interactive)
13 (cond ((/= (count-windows) 2)
14 (message "You need exactly 2 windows to do this."))
15 (t
16 (let* ((w1 (first (window-list)))
17 (w2 (second (window-list)))
18 (b1 (window-buffer w1))
19 (b2 (window-buffer w2))
20 (s1 (window-start w1))
21 (s2 (window-start w2)))
22 (set-window-buffer w1 b2)
23 (set-window-buffer w2 b1)
24 (set-window-start w1 s2)
25 (set-window-start w2 s1))))
26 (other-window 1))
27
28 (provide 'navigation-utils)
Something went wrong with that request. Please try again.