summaryrefslogtreecommitdiff
path: root/init/00-km-general.el
blob: 7d8449a4482acbefb8d30a756b5d10b4bf648fbb (plain)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
(setq default-frame-alist '((font . "Droid Sans Mono-9")))

(setq inhibit-splash-screen t
      initial-scratch-message nil)

(scroll-bar-mode -1)
(tool-bar-mode -1)
(menu-bar-mode -1)

(setq-default indicate-empty-lines t)
(when (not indicate-empty-lines)
  (toggle-indicate-empty-lines))

(setq echo-keystrokes 0.1
      use-dialog-box nil
      visible-bell t)
(show-paren-mode t)

(defalias 'yes-or-no-p 'y-or-n-p)

;; line info
(line-number-mode t)
(column-number-mode t)
(size-indication-mode t)

;; set location of custom.el
(setq custom-file "~/.emacs.d/custom.el")
(load custom-file)

;; store all backup and autosave files in the tmp dir
(setq backup-directory-alist
      `((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
      `((".*" ,temporary-file-directory t)))

;; revert buffers automatically when underlying files are changed externally
(global-auto-revert-mode t)

;; tramp
(require 'tramp)
(setq tramp-default-method "ssh")

(setq browse-url-browser-function 'browse-url-generic
          browse-url-generic-program "chromium")

(setq x-select-enable-clipboard t)
(setq interprogram-paste-function 'x-cut-buffer-or-selection-value)

;; make scripts executable at save
(add-hook 'after-save-hook
  'executable-make-buffer-file-executable-if-script-p)

(setq-default fill-column 72)
(add-hook 'text-mode-hook 'turn-on-auto-fill)

;; (require 'ess-site)
(add-hook 'ess-mode-hook (lambda ()
                           (setq ess-indent-level 4)))

(add-hook 'sh-mode-hook (lambda ()
                          (setq sh-basic-offset 4)))

;; make whitespace-mode use just basic coloring
;; http://ergoemacs.org/emacs/whitespace-mode.html
(setq whitespace-style (quote
                        (spaces tabs newline space-mark
                                tab-mark newline-mark)))

(transient-mark-mode -1)

;; share clipboard with system
(setq x-select-enable-clipboard t)

(blink-cursor-mode -1)

(put 'narrow-to-region 'disabled nil)

(setq ispell-program-name "aspell")

(global-set-key (kbd "M-/") 'hippie-expand)

(setq sentence-end-double-space nil)