forked from vjohansen/emacs-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vj-std-essentials.el
66 lines (46 loc) · 1.95 KB
/
vj-std-essentials.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
(set-register ?t '(file . "~/tempfile")) ;Use this instead of *scratch*
(show-paren-mode t)
(recentf-mode t)
(global-set-key (kbd "C-x C-r") 'recentf-open-files)
(which-function-mode)
(auto-compression-mode t)
;; Change annoying yes/no RET questions to single keypress of y or n
(fset 'yes-or-no-p 'y-or-n-p)
(prefer-coding-system 'utf-8)
;; Also show filename and vps project in title bar
(setq frame-title-format
'("" invocation-name "@" system-name " " " %f [" vps-project-name "]"))
(setq visible-bell t) ;; no beeps!
(setq-default indent-tabs-mode nil) ; Do not use tabs for indent
(setq compilation-ask-about-save nil) ; Just save files before compile
(setq find-file-existing-other-name t)
(add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p)
(require 'uniquify)
(setq uniquify-buffer-name-style 'post-forward)
(setq
recentf-exclude '("\\.tags$")
recentf-max-saved-items 200)
;; ------------------------------------------------------------
(iswitchb-mode t)
;; Make it possible for comma to start subprocessing (ANDing)
(defun iswitchb-my-keys ()
"Add my keybindings for iswitchb."
(define-key iswitchb-mode-map "," 'iswitchb-exclude-nonmatching))
(add-hook 'iswitchb-define-mode-map-hook 'iswitchb-my-keys)
(defun iswitchb-exclude-nonmatching()
"Make iswitchb work on only the currently matching names."
(interactive)
(setq iswitchb-buflist iswitchb-matches)
(setq iswitchb-rescan t)
(delete-minibuffer-contents))
;; ------------------------------------------------------------
;; Use M-n/M-p in minibuffer to complete history entries based on prefix
(mapcar
(function
(lambda (x)
(define-key x (kbd "ESC p") 'previous-complete-history-element)
(define-key x (kbd "ESC n") 'next-complete-history-element)))
(list minibuffer-local-completion-map minibuffer-local-isearch-map
minibuffer-local-map minibuffer-local-must-match-map
minibuffer-local-ns-map))
(provide 'vj-std-essentials)