Mercurial > hg > dotemacs
annotate dotemacs.el @ 54:6673ad9084d4
Add vi-like bindings for info
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Mon, 02 Apr 2012 11:57:28 -0400 |
parents | e57a4e6cb19e |
children | ef640c568ff3 |
rev | line source |
---|---|
0 | 1 (custom-set-variables |
42
8774f0539f92
Some erc customisations plus a few more safe local variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
41
diff
changeset
|
2 ;; custom-set-variables was added by Custom. |
8774f0539f92
Some erc customisations plus a few more safe local variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
41
diff
changeset
|
3 ;; If you edit it by hand, you could mess it up, so be careful. |
8774f0539f92
Some erc customisations plus a few more safe local variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
41
diff
changeset
|
4 ;; Your init file should contain only one such instance. |
8774f0539f92
Some erc customisations plus a few more safe local variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
41
diff
changeset
|
5 ;; If there is more than one, they won't work right. |
0 | 6 '(LaTeX-indent-level 2) |
7 '(LaTeX-item-indent 0) | |
8 '(TeX-PDF-mode t) | |
9 '(TeX-brace-indent-level 2) | |
10 '(TeX-debug-bad-boxes t) | |
11 '(TeX-debug-warnings t) | |
12 '(TeX-display-help nil) | |
13 '(TeX-newline-function (quote reindent-then-newline-and-indent)) | |
14 '(TeX-output-view-style (quote (("^dvi$" ("^landscape$" "^pstricks$\\|^pst-\\|^psfrag$") "%(o?)dvips -t landscape %d -o && gv %f") ("^dvi$" "^pstricks$\\|^pst-\\|^psfrag$" "%(o?)dvips %d -o && gv %f") ("^dvi$" ("^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$" "^landscape$") "%(o?)xdvi %dS -paper a4r -s 0 %d") ("^dvi$" "^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$" "%(o?)xdvi %dS -paper a4 %d") ("^dvi$" ("^a5\\(?:comb\\|paper\\)$" "^landscape$") "%(o?)xdvi %dS -paper a5r -s 0 %d") ("^dvi$" "^a5\\(?:comb\\|paper\\)$" "%(o?)xdvi %dS -paper a5 %d") ("^dvi$" "^b5paper$" "%(o?)xdvi %dS -paper b5 %d") ("^dvi$" "^letterpaper$" "%(o?)xdvi %dS -paper us %d") ("^dvi$" "^legalpaper$" "%(o?)xdvi %dS -paper legal %d") ("^dvi$" "^executivepaper$" "%(o?)xdvi %dS -paper 7.25x10.5in %d") ("^dvi$" "." "%(o?)xdvi %dS %d") ("^pdf$" "." "evince %o %(outpage)") ("^html?$" "." "netscape %o")))) | |
35
36448fcd7202
Set a few Customise variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
34
diff
changeset
|
15 '(TeX-view-program-selection (quote (((output-dvi style-pstricks) "dvips and gv") (output-dvi "Evince") (output-pdf "Evince") (output-html "xdg-open")))) |
36448fcd7202
Set a few Customise variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
34
diff
changeset
|
16 '(add-log-mailing-address "jordigh@gmail.com") |
0 | 17 '(auto-compression-mode t nil (jka-compr)) |
7
2c6fced452ac
Don't indent in namespace blocks, don't follow symlinks in VC
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
18 '(c-offsets-alist (quote ((substatement-open . 0) (innamespace . 0)))) |
0 | 19 '(case-fold-search t) |
3
f25df4483e30
Add column number mode, comment out manual inclusion of cmake-mode, make default font smaller
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
20 '(column-number-mode t) |
0 | 21 '(comint-input-autoexpand (quote history)) |
22 '(comint-move-point-for-output (quote all)) | |
23 '(comint-prompt-read-only t) | |
24 '(comint-scroll-to-bottom-on-input (quote all)) | |
25 '(compilation-scroll-output t) | |
26 '(confirm-kill-emacs (quote yes-or-no-p)) | |
27 '(cperl-auto-newline nil) | |
28 '(cperl-close-paren-offset 0) | |
29 '(cperl-electric-backspace-untabify nil) | |
30 '(cperl-highlight-variables-indiscriminately t) | |
31 '(cperl-merge-trailing-else nil) | |
32 '(current-language-environment "UTF-8") | |
33 '(debian-changelog-full-name "Jordi Gutiérrez Hermoso") | |
34 '(debian-changelog-mailing-address "jordigh@gmail.com") | |
35 '(default-input-method "latin-1-prefix") | |
18
a48ef65db31f
Some ECB configs
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
17
diff
changeset
|
36 '(ecb-options-version "2.32") |
a48ef65db31f
Some ECB configs
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
17
diff
changeset
|
37 '(ecb-tip-of-the-day nil) |
0 | 38 '(ediff-split-window-function (quote split-window-horizontally)) |
42
8774f0539f92
Some erc customisations plus a few more safe local variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
41
diff
changeset
|
39 '(erc-input-line-position 0 t) |
8774f0539f92
Some erc customisations plus a few more safe local variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
41
diff
changeset
|
40 '(erc-modules (quote (highlight-nicknames scrolltobottom completion autojoin button fill irccontrols list match menu move-to-prompt netsplit networks noncommands readonly ring stamp track))) |
0 | 41 '(global-font-lock-mode t nil (font-lock)) |
42 '(indent-tabs-mode nil) | |
16
b8eeda0a7bad
Inhibit startup buffer menu
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
15
diff
changeset
|
43 '(inhibit-startup-buffer-menu t) |
0 | 44 '(inhibit-startup-screen t) |
45 '(jde-jdk-registry (quote (("1.6.0" . "/usr/lib/jvm/java-6-openjdk")))) | |
46 '(js2-auto-indent-flag nil) | |
47 '(js2-bounce-indent-flag nil) | |
48 '(js2-enter-indents-newline nil) | |
49 '(js2-mirror-mode nil) | |
20
d8cde0480aec
Add django and legalese modes
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
19
diff
changeset
|
50 '(legalese-default-author "Jordi Gutiérrez Hermoso") |
39
96e72d04230b
Use copyright symbol in legalese, unbind M-s
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
36
diff
changeset
|
51 '(legalese-default-copyright "Jordi Gutiérrez Hermoso <jordigh@gmail.com>") |
0 | 52 '(make-backup-files nil) |
9
31bf8e120ebf
Customize diff colours, thanks to #emacs quicksilver for the head start
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
53 '(menu-bar-mode t) |
25
67a96731dbab
Make ipython default in Python; don't open more than one window when starting up with multiple files; attempt to do comments in Django.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
24
diff
changeset
|
54 '(py-python-command "ipython") |
52
333ce650e6f3
Update allowable variables
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
51
diff
changeset
|
55 '(safe-local-variable-values (quote ((eval when (string-match "\\.in\\'" (buffer-file-name)) (html-mode)) (eval when (string-match "\\.h\\'" (buffer-file-name)) (unless (string-match "/gnulib/" (buffer-file-name)) (c++-mode) (c-set-style "gnu"))) (py-indent-offset . 4) (eval when (string-match "\\.h\\'" (buffer-file-name)) (c++-mode) (c-set-style "gnu"))))) |
0 | 56 '(savehist-mode t nil (savehist)) |
57 '(show-paren-mode t) | |
58 '(tab-width 2) | |
59 '(tabbar-mode t nil (tabbar)) | |
60 '(text-mode-hook (quote (text-mode-hook-identify))) | |
61 '(tool-bar-mode nil) | |
62 '(transient-mark-mode nil) | |
63 '(uniquify-buffer-name-style (quote forward) nil (uniquify)) | |
7
2c6fced452ac
Don't indent in namespace blocks, don't follow symlinks in VC
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
64 '(vc-follow-symlinks nil) |
0 | 65 '(w3m-default-display-inline-images t) |
66 '(w3m-use-cookies t)) | |
67 (custom-set-faces | |
42
8774f0539f92
Some erc customisations plus a few more safe local variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
41
diff
changeset
|
68 ;; custom-set-faces was added by Custom. |
8774f0539f92
Some erc customisations plus a few more safe local variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
41
diff
changeset
|
69 ;; If you edit it by hand, you could mess it up, so be careful. |
8774f0539f92
Some erc customisations plus a few more safe local variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
41
diff
changeset
|
70 ;; Your init file should contain only one such instance. |
8774f0539f92
Some erc customisations plus a few more safe local variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
41
diff
changeset
|
71 ;; If there is more than one, they won't work right. |
27
8763b5053360
Change default font
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
25
diff
changeset
|
72 '(default ((t (:inherit nil :stipple nil :background "grey20" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 98 :width normal :foundry "unknown" :family "Liberation Mono")))) |
9
31bf8e120ebf
Customize diff colours, thanks to #emacs quicksilver for the head start
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
73 '(diff-added ((t (:foreground "green")))) |
31bf8e120ebf
Customize diff colours, thanks to #emacs quicksilver for the head start
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
74 '(diff-changed ((t (:foreground "orange")))) |
31bf8e120ebf
Customize diff colours, thanks to #emacs quicksilver for the head start
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
75 '(diff-file-header ((((class color) (background light)) (:background "lightblue" :bold t)))) |
31bf8e120ebf
Customize diff colours, thanks to #emacs quicksilver for the head start
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
76 '(diff-header ((nil (:foreground "skyblue")))) |
28
214a64830015
Set better colour for diff mode, remove bannerwhen calling python mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
27
diff
changeset
|
77 '(diff-refine-change ((((class color) (min-colors 88) (background dark)) (:background "#004090")))) |
17
8e043fc0f396
Change the colour of highlighted tabs
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
78 '(diff-removed ((t (:foreground "red")))) |
18
a48ef65db31f
Some ECB configs
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
17
diff
changeset
|
79 '(ecb-tag-header-face ((((class color) (background dark)) (:background "DarkGreen")))) |
42
8774f0539f92
Some erc customisations plus a few more safe local variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
41
diff
changeset
|
80 '(erc-input-face ((t (:foreground "yellow")))) |
8774f0539f92
Some erc customisations plus a few more safe local variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
41
diff
changeset
|
81 '(erc-my-nick-face ((t (:foreground "lightblue" :weight bold)))) |
8774f0539f92
Some erc customisations plus a few more safe local variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
41
diff
changeset
|
82 '(erc-notice-face ((t (:foreground "lightgreen" :weight bold)))) |
53
e57a4e6cb19e
Change highlight background
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
52
diff
changeset
|
83 '(highlight ((((class color) (min-colors 88) (background dark)) (:background "#555")))) |
49
8f4ab482c4bd
Give better colours to magit's diff
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
48
diff
changeset
|
84 '(magit-diff-add ((((class color) (background dark)) (:foreground "green")))) |
45
a340e236959a
Change colours for RST
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
43
diff
changeset
|
85 '(rst-level-1-face ((t (:foreground "pink"))) t) |
a340e236959a
Change colours for RST
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
43
diff
changeset
|
86 '(rst-level-2-face ((t (:background "grey30"))) t) |
33
0479db13b7e8
Add stripes-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
31
diff
changeset
|
87 '(show-ws-tab ((t (:background "Black")))) |
0479db13b7e8
Add stripes-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
31
diff
changeset
|
88 '(stripes-face ((t (:background "#444"))))) |
0 | 89 |
1 | 90 (add-to-list 'load-path "~/.emacs.d/plugins/") |
0 | 91 |
92 (defalias 'perl-mode 'cperl-mode) | |
93 | |
8
04f1a90eca70
Restore ipython mode, remove manual inclusion of cmake-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
7
diff
changeset
|
94 (require 'ipython) |
28
214a64830015
Set better colour for diff mode, remove bannerwhen calling python mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
27
diff
changeset
|
95 (setq py-python-command-args '("-nobanner")) |
0 | 96 |
20
d8cde0480aec
Add django and legalese modes
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
19
diff
changeset
|
97 (require 'legalese) |
d8cde0480aec
Add django and legalese modes
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
19
diff
changeset
|
98 |
23
3488f4f3a2b5
Add rainbow-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
21
diff
changeset
|
99 (require 'django-mode) |
3488f4f3a2b5
Add rainbow-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
21
diff
changeset
|
100 |
3488f4f3a2b5
Add rainbow-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
21
diff
changeset
|
101 (require 'rainbow-mode) |
3488f4f3a2b5
Add rainbow-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
21
diff
changeset
|
102 |
34
bc465cea7922
Require stripes-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
33
diff
changeset
|
103 (require 'stripes) |
bc465cea7922
Require stripes-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
33
diff
changeset
|
104 |
43
502a9f3c0d91
Smart tabs for python-mode.el trolololol
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
42
diff
changeset
|
105 (require 'smart-tabs) |
502a9f3c0d91
Smart tabs for python-mode.el trolololol
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
42
diff
changeset
|
106 |
42
8774f0539f92
Some erc customisations plus a few more safe local variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
41
diff
changeset
|
107 ;(require 'erc-highlight-mode) |
8774f0539f92
Some erc customisations plus a few more safe local variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
41
diff
changeset
|
108 (setq erc-input-line-position -2) |
8774f0539f92
Some erc customisations plus a few more safe local variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
41
diff
changeset
|
109 |
30
307f33925be1
Use org-mode to write blogthings
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
29
diff
changeset
|
110 ;; Use org-mode to write blogthings |
307f33925be1
Use org-mode to write blogthings
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
29
diff
changeset
|
111 (setq load-path (cons "~/.emacs.d/plugins/org2blog/" load-path)) |
307f33925be1
Use org-mode to write blogthings
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
29
diff
changeset
|
112 (require 'org2blog) |
307f33925be1
Use org-mode to write blogthings
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
29
diff
changeset
|
113 |
307f33925be1
Use org-mode to write blogthings
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
29
diff
changeset
|
114 (setq org2blog-server-url "http://jordi.inversethought.com/xmlrpc.php" |
307f33925be1
Use org-mode to write blogthings
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
29
diff
changeset
|
115 org2blog-server-user "jordigh" |
307f33925be1
Use org-mode to write blogthings
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
29
diff
changeset
|
116 org2blog-server-weblog-id "") |
307f33925be1
Use org-mode to write blogthings
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
29
diff
changeset
|
117 |
0 | 118 (server-start) |
119 | |
41
02441454df4d
Fix whitespace and parens
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
39
diff
changeset
|
120 ;(define-derived-mode tabified-python-mode python-mode |
0 | 121 ; "tabified Python" (setq indent-tabs-mode t)) |
122 | |
123 ;; wtf is this crap? begone! | |
124 (setq transient-mark-mode nil) | |
125 | |
126 (global-set-key (kbd "C-S-n") 'tabbar-forward-tab) | |
127 (global-set-key (kbd "C-S-p") 'tabbar-backward-tab) | |
128 (global-set-key (kbd "C-c C-S-n") 'tabbar-forward-group) | |
129 (global-set-key (kbd "C-c C-S-p") 'tabbar-backward-group) | |
130 | |
131 (global-set-key (kbd "C-S-j") 'windmove-down) | |
132 (global-set-key (kbd "C-S-k") 'windmove-up) | |
133 (global-set-key (kbd "C-S-h") 'windmove-left) | |
134 (global-set-key (kbd "C-S-l") 'windmove-right) | |
135 | |
36 | 136 (global-set-key (kbd "M-<down>") 'gud-next) |
137 (global-set-key (kbd "M-<right>") 'gud-step) | |
138 (global-set-key (kbd "M-<left>") 'gud-finish) | |
139 (global-set-key (kbd "M-<RET>") 'gud-cont) | |
140 (global-unset-key (kbd "C-x <DEL>")) | |
141 (global-set-key (kbd "C-x <DEL>") 'gud-remove) | |
46
cbc4cf1f50b5
Add gud key to stop job
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
45
diff
changeset
|
142 (global-unset-key (kbd "C-x C-z")) |
cbc4cf1f50b5
Add gud key to stop job
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
45
diff
changeset
|
143 (global-set-key (kbd "C-x C-z") 'gud-stop-subjob) |
36 | 144 |
13
24194e20af48
Make kill-buffer always kill current buffer
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
145 ;; Only killing the current buffer is useful (thanks to madpickle of #emacs) |
15
b1a031281538
Fix the kill buffer keybinding
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
146 (global-set-key (kbd "C-x k") |
13
24194e20af48
Make kill-buffer always kill current buffer
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
147 (lambda () (interactive) (kill-buffer (current-buffer)))) |
24194e20af48
Make kill-buffer always kill current buffer
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
148 |
50 | 149 ;; I never use this function, and I frequently typo it when trying to |
150 ;; hit C-x C-f | |
151 (global-unset-key (kbd "C-x f")) | |
152 | |
0 | 153 (setq auto-mode-alist |
154 (append | |
155 '( | |
41
02441454df4d
Fix whitespace and parens
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
39
diff
changeset
|
156 ("\\.m\\'" . octave-mode) |
02441454df4d
Fix whitespace and parens
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
39
diff
changeset
|
157 ("\\.eml\\'" . mail-mode) |
02441454df4d
Fix whitespace and parens
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
39
diff
changeset
|
158 ("\\.pro\\'" . conf-mode)) ;; Qt project files |
0 | 159 auto-mode-alist)) |
160 | |
31
66007544445e
Remove smooth-scrolling.el, use builtin variables instead
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
30
diff
changeset
|
161 ;; Scroll smoothly |
66007544445e
Remove smooth-scrolling.el, use builtin variables instead
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
30
diff
changeset
|
162 (setq scroll-step 1000) |
66007544445e
Remove smooth-scrolling.el, use builtin variables instead
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
30
diff
changeset
|
163 (setq scroll-conservatively 1000) |
0 | 164 |
24 | 165 ;; This ido thing looks interesting... |
166 (ido-mode 1) | |
167 | |
0 | 168 (setq default-major-mode 'text-mode) |
169 (global-unset-key "\C-z") | |
170 | |
25
67a96731dbab
Make ipython default in Python; don't open more than one window when starting up with multiple files; attempt to do comments in Django.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
24
diff
changeset
|
171 ;; Don't like it when several windows open upon emacs startup |
67a96731dbab
Make ipython default in Python; don't open more than one window when starting up with multiple files; attempt to do comments in Django.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
24
diff
changeset
|
172 ;; (Thanks theseb of #emacs) |
67a96731dbab
Make ipython default in Python; don't open more than one window when starting up with multiple files; attempt to do comments in Django.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
24
diff
changeset
|
173 (add-hook 'window-setup-hook 'delete-other-windows) |
67a96731dbab
Make ipython default in Python; don't open more than one window when starting up with multiple files; attempt to do comments in Django.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
24
diff
changeset
|
174 (add-to-list 'same-window-buffer-names "*Buffer List*") |
67a96731dbab
Make ipython default in Python; don't open more than one window when starting up with multiple files; attempt to do comments in Django.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
24
diff
changeset
|
175 |
0 | 176 ;; Set auto-fill for all modes |
177 ;(setq-default auto-fill-function 'do-auto-fill) | |
178 | |
12
15824057b993
Make ibuffer default
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
11
diff
changeset
|
179 ;ibuffer is the only decent one |
15824057b993
Make ibuffer default
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
11
diff
changeset
|
180 (global-set-key (kbd "C-x C-b") 'ibuffer) |
15824057b993
Make ibuffer default
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
11
diff
changeset
|
181 |
11
228001e42997
GUD windows aren't that useful after all, hide them
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
10
diff
changeset
|
182 ;Make GUD put output in a different buffer |
0 | 183 (setq gdb-separate-io t) |
184 | |
5
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
185 ;; Highlight "FIXME: and TODO:" |
0 | 186 (font-lock-add-keywords |
187 'c-mode | |
188 '(("\\<\\(FIXME\\)" 1 font-lock-warning-face t))) | |
189 | |
190 (font-lock-add-keywords | |
191 'c++-mode | |
192 '(("\\<\\(FIXME\\):" 1 font-lock-warning-face t))) | |
193 | |
5
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
194 (font-lock-add-keywords |
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
195 'c-mode |
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
196 '(("\\<\\(TODO\\):" 1 font-lock-warning-face t))) |
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
197 |
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
198 (font-lock-add-keywords |
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
199 'c++-mode |
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
200 '(("\\<\\(TODO\\):" 1 font-lock-warning-face t))) |
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
201 |
0 | 202 ;; Let auto-fill end lines with a full stop. |
203 (setq sentence-end-double-space nil) | |
204 | |
205 ;; Don't scroll off horizontally when splitting windows vertically. | |
206 (setq truncate-partial-width-windows nil) | |
207 | |
208 ;; Don't let ediff open a new frame | |
209 (setq ediff-window-setup-function 'ediff-setup-windows-plain) | |
210 | |
19
54767f6d121e
Disable electric mode in C-derived modes
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
18
diff
changeset
|
211 ;; Don't like stuff to indent when I don't hit <TAB> |
54767f6d121e
Disable electric mode in C-derived modes
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
18
diff
changeset
|
212 (add-hook 'c-mode-common-hook (lambda() (setq c-electric-flag nil))) |
54767f6d121e
Disable electric mode in C-derived modes
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
18
diff
changeset
|
213 |
0 | 214 ;; Menus are for wimps |
2
2194965b6dab
Fix removal of menu bar
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
1
diff
changeset
|
215 (menu-bar-mode -1) |
0 | 216 |
217 ;; ;; Use plain tabs in text mode | |
218 ;; (add-hook 'text-mode-hook | |
219 ;; (lambda () (define-key | |
220 ;; text-mode-map (kbd "TAB") | |
221 ;; (lambda () | |
222 ;; (interactive) | |
223 ;; (let ((was-at-bol (bolp))) | |
224 ;; (save-excursion | |
225 ;; (goto-char (point-at-bol)) | |
226 ;; (insert " ")) | |
227 ;; (when was-at-bol | |
228 ;; (back-to-indentation ))))))) | |
229 | |
230 (put 'narrow-to-region 'disabled nil) | |
231 | |
232 ;;; Inserts a relative pathname interactively | |
233 (defun insert-relative-path (path) | |
234 (interactive (list (read-file-name "Path to insert relatively: "))) | |
41
02441454df4d
Fix whitespace and parens
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
39
diff
changeset
|
235 (insert (file-relative-name path default-directory))) |
0 | 236 |
237 ; Add cmake listfile names to the mode list. | |
238 (setq auto-mode-alist | |
41
02441454df4d
Fix whitespace and parens
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
39
diff
changeset
|
239 (append |
02441454df4d
Fix whitespace and parens
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
39
diff
changeset
|
240 '(("CMakeLists\\.txt\\'" . cmake-mode)) |
02441454df4d
Fix whitespace and parens
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
39
diff
changeset
|
241 '(("\\.cmake\\'" . cmake-mode)) |
02441454df4d
Fix whitespace and parens
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
39
diff
changeset
|
242 auto-mode-alist)) |
0 | 243 |
244 (defun set-tab-width (width) | |
245 (interactive "nSet tab width: ") | |
246 (setq tab-width width)) | |
247 | |
248 ;; "Fix" the horrible asn1-mode mess | |
249 (add-hook 'asn1-mode-hook | |
250 (lambda () | |
251 (setq indent-line-function #'indent-relative) | |
252 (setq case-fold-search t))) | |
20
d8cde0480aec
Add django and legalese modes
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
19
diff
changeset
|
253 |
29
8120e877b58b
Turn on auto-fill for mail-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
28
diff
changeset
|
254 ;; What it says on the tin |
8120e877b58b
Turn on auto-fill for mail-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
28
diff
changeset
|
255 (add-hook 'mail-mode-hook 'turn-on-auto-fill) |
43
502a9f3c0d91
Smart tabs for python-mode.el trolololol
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
42
diff
changeset
|
256 |
54
6673ad9084d4
Add vi-like bindings for info
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
53
diff
changeset
|
257 ;; Some info vi-like keybindings |
6673ad9084d4
Add vi-like bindings for info
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
53
diff
changeset
|
258 (add-hook 'Info-mode-hook |
6673ad9084d4
Add vi-like bindings for info
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
53
diff
changeset
|
259 (lambda () |
6673ad9084d4
Add vi-like bindings for info
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
53
diff
changeset
|
260 (local-unset-key (kbd "l")) |
6673ad9084d4
Add vi-like bindings for info
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
53
diff
changeset
|
261 (local-set-key (kbd ";") 'Info-history-back) |
6673ad9084d4
Add vi-like bindings for info
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
53
diff
changeset
|
262 (local-set-key (kbd "h") 'backward-char) |
6673ad9084d4
Add vi-like bindings for info
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
53
diff
changeset
|
263 (local-set-key (kbd "l") 'forward-char) |
6673ad9084d4
Add vi-like bindings for info
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
53
diff
changeset
|
264 (local-set-key (kbd "j") 'next-line) |
6673ad9084d4
Add vi-like bindings for info
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
53
diff
changeset
|
265 (local-set-key (kbd "k") 'previous-line))) |
6673ad9084d4
Add vi-like bindings for info
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
53
diff
changeset
|
266 |
43
502a9f3c0d91
Smart tabs for python-mode.el trolololol
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
42
diff
changeset
|
267 ;; Something seems to clobber whitespace-mode, this should fix it |
502a9f3c0d91
Smart tabs for python-mode.el trolololol
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
42
diff
changeset
|
268 (whitespace-toggle-options 'whitespace-style) |
502a9f3c0d91
Smart tabs for python-mode.el trolololol
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
42
diff
changeset
|
269 |
51
dca677354b38
Add remove-ctrl-m command
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
50
diff
changeset
|
270 (defun hide-ctrl-M () |
dca677354b38
Add remove-ctrl-m command
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
50
diff
changeset
|
271 "Hides the annoying '^M' showing up in files containing mixed |
dca677354b38
Add remove-ctrl-m command
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
50
diff
changeset
|
272 UNIX and DOS line endings." |
dca677354b38
Add remove-ctrl-m command
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
50
diff
changeset
|
273 (interactive) |
dca677354b38
Add remove-ctrl-m command
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
50
diff
changeset
|
274 (setq buffer-display-table (make-display-table)) |
dca677354b38
Add remove-ctrl-m command
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
50
diff
changeset
|
275 (aset buffer-display-table ?\^M [])) |
dca677354b38
Add remove-ctrl-m command
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
50
diff
changeset
|
276 |