commit | author | age
|
5cb5f7
|
1 |
(provide 'setup-applications) |
C |
2 |
|
|
3 |
(require 'eshell) |
|
4 |
(require 'em-alias) |
|
5 |
(require 'cl) |
|
6 |
|
|
7 |
;; Advise find-file-other-window to accept more than one file |
|
8 |
(defadvice find-file-other-window (around find-files activate) |
|
9 |
"Also find all files within a list of files. This even works recursively." |
|
10 |
(if (listp filename) |
|
11 |
(loop for f in filename do (find-file-other-window f wildcards)) |
|
12 |
ad-do-it)) |
|
13 |
|
|
14 |
;; In Eshell, you can run the commands in M-x |
|
15 |
;; Here are the aliases to the commands. |
|
16 |
;; $* means accepts all arguments. |
|
17 |
(eshell/alias "o" "") |
|
18 |
(eshell/alias "o" "find-file-other-window $*") |
|
19 |
(eshell/alias "vi" "find-file-other-window $*") |
|
20 |
(eshell/alias "vim" "find-file-other-window $*") |
|
21 |
(eshell/alias "emacs" "find-file-other-windpow $*") |
|
22 |
(eshell/alias "em" "find-file-other-window $*") |
|
23 |
|
|
24 |
(add-hook |
|
25 |
'eshell-mode-hook |
|
26 |
(lambda () |
|
27 |
(setq pcomplete-cycle-completions nil))) |
|
28 |
|
|
29 |
;; change listing switches based on OS |
|
30 |
(when (not (eq system-type 'windows-nt)) |
|
31 |
(eshell/alias "ls" "ls --color -h --group-directories-first $*")) |