diff options
Diffstat (limited to '.emacs')
| -rw-r--r-- | .emacs | 80 |
1 files changed, 36 insertions, 44 deletions
| @@ -3,78 +3,70 @@ | |||
| 3 | ;; under X, instead of the default, backspace behavior. | 3 | ;; under X, instead of the default, backspace behavior. |
| 4 | (global-set-key [delete] 'delete-char) | 4 | (global-set-key [delete] 'delete-char) |
| 5 | (global-set-key [kp-delete] 'delete-char) | 5 | (global-set-key [kp-delete] 'delete-char) |
| 6 | ;;(global-set-key (read-kbd-macro "C-c <") 'end-of-buffer) | ||
| 7 | (global-set-key [f1] 'comment-region) | ||
| 8 | (global-set-key [f2] 'uncomment-region) | ||
| 9 | ;;(global-set-key "C-<<" 'end-of-buffer) | ||
| 10 | |||
| 11 | 6 | ||
| 12 | ;; My own key bindings ;; | 7 | ;; My own key bindings ;; |
| 13 | ;;(global-set-key [f1] 'compile) | 8 | ;;(global-set-key [f1] 'compile) |
| 14 | ;;(global-set-key [f2] 'delete-other-windows) | ||
| 15 | |||
| 16 | 9 | ||
| 17 | ;; Turn on font-lock mode for Emacs | 10 | ;; Turn on font-lock mode for Emacs |
| 18 | (global-font-lock-mode t) | 11 | (global-font-lock-mode t) |
| 19 | 12 | ||
| 13 | ;; custom-set-faces was added by Custom. | ||
| 14 | ;; If you edit it by hand, you could mess it up, so be careful. | ||
| 15 | ;; Your init file should contain only one such instance. | ||
| 16 | ;; If there is more than one, they won't work right. | ||
| 17 | (custom-set-faces | ||
| 18 | '(font-lock-comment-face ((nil (:foreground "red"))))) | ||
| 20 | 19 | ||
| 21 | |||
| 22 | ;; Always end a file with a newline | ||
| 23 | ;;(setq require-final-newline t) | 20 | ;;(setq require-final-newline t) |
| 24 | (setq require-final-newline nil) | 21 | (setq require-final-newline nil) |
| 25 | 22 | ;; Stop at the end of the file, not just add lines | |
| 26 | 23 | (setq next-line-add-newlines nil) | |
| 27 | (setq auto-save-default nil) | ||
| 28 | (setq default-tab-width 4) | ||
| 29 | (setq make-backup-files nil) | ||
| 30 | 24 | ||
| 31 | ;; Display columns | 25 | ;; Display columns |
| 32 | (setq column-number-mode t) | 26 | (setq column-number-mode t) |
| 33 | |||
| 34 | (setq inhibit-splash-screen t) | 27 | (setq inhibit-splash-screen t) |
| 35 | 28 | ||
| 36 | ;; indent to spaces only | 29 | ;; vim-Scroll |
| 37 | (setq-default indent-tabs-mode nil) | 30 | (setq scroll-conservatively 1) |
| 38 | |||
| 39 | ;; Stop at the end of the file, not just add lines | ||
| 40 | (setq next-line-add-newlines nil) | ||
| 41 | |||
| 42 | |||
| 43 | ;; Customized font-lock-comment-face | ||
| 44 | (custom-set-variables | ||
| 45 | ;; custom-set-variables was added by Custom. | ||
| 46 | ;; If you edit it by hand, you could mess it up, so be careful. | ||
| 47 | ;; Your init file should contain only one such instance. | ||
| 48 | ;; If there is more than one, they won't work right. | ||
| 49 | ) | ||
| 50 | (custom-set-faces | ||
| 51 | ;; custom-set-faces was added by Custom. | ||
| 52 | ;; If you edit it by hand, you could mess it up, so be careful. | ||
| 53 | ;; Your init file should contain only one such instance. | ||
| 54 | ;; If there is more than one, they won't work right. | ||
| 55 | '(font-lock-comment-face ((nil (:foreground "red"))))) | ||
| 56 | 31 | ||
| 32 | ;; Various | ||
| 33 | (setq auto-save-default nil) | ||
| 34 | (setq make-backup-files nil) | ||
| 57 | 35 | ||
| 58 | ;; Needed in Ubuntu | 36 | ;; UTF-8 support (legacy workaround for Ubuntu) |
| 59 | (set-default-coding-systems 'utf-8) | 37 | (set-default-coding-systems 'utf-8) |
| 60 | (set-terminal-coding-system 'utf-8) | 38 | (set-terminal-coding-system 'utf-8) |
| 61 | (set-keyboard-coding-system 'utf-8) | 39 | (set-keyboard-coding-system 'utf-8) |
| 62 | 40 | ||
| 63 | ;; vim-Scroll | ||
| 64 | (setq scroll-conservatively 1) | ||
| 65 | 41 | ||
| 42 | ;; Programming section | ||
| 66 | 43 | ||
| 67 | ;; (require 'pymacs) | 44 | ;; Indentation |
| 68 | ;; (pymacs-load "ropemacs" "rope-") | 45 | (setq-default c-basic-offset 4 tab-width 4 indent-tabs-mode nil) |
| 69 | ;; (setq ropemacs-enable-autoimport t) | ||
| 70 | 46 | ||
| 47 | ;; Default coding style | ||
| 48 | (setq c-default-style "bsd") | ||
| 71 | 49 | ||
| 72 | ;; (yas/initialize) | 50 | ;; yasnippet |
| 51 | (yas/initialize) | ||
| 73 | ;; (setq yas/root-directory '("~/.emacs.d/mysnippets" | 52 | ;; (setq yas/root-directory '("~/.emacs.d/mysnippets" |
| 74 | ;; "/usr/share/emacs/site-lisp/yasnippet/snippets")) | 53 | ;; "/usr/share/emacs/site-lisp/yasnippet/snippets")) |
| 75 | ;; (mapc 'yas/load-directory yas/root-directory) | 54 | ;; (mapc 'yas/load-directory yas/root-directory) |
| 76 | (yas/load-directory "~/.emacs.d/mysnippets") | 55 | (yas/load-directory "~/.emacs.d/mysnippets") |
| 77 | 56 | ||
| 78 | 57 | ||
| 79 | (setq c-default-style "bsd" | 58 | ;; Python stuff |
| 80 | c-basic-offset 2) | 59 | |
| 60 | ;; Don't attempt to guess the indent | ||
| 61 | (setq python-indent-guess-indent-offset nil) | ||
| 62 | |||
| 63 | ;; (require 'pymacs) | ||
| 64 | ;; (pymacs-load "ropemacs" "rope-") | ||
| 65 | ;; (setq ropemacs-enable-autoimport t) | ||
| 66 | |||
| 67 | |||
| 68 | ;; CUA mode | ||
| 69 | ;;(cua-mode t) | ||
| 70 | ;;(setq cua-auto-tabify-rectangles nil) | ||
| 71 | ;;(transient-mark-mode 1) | ||
| 72 | ;;(cua-selection-mode t) | ||
