blob: 9dab30b032318f644a945323b3e493bad3c5b97b (
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
83
84
85
86
87
88
|
;; Set up the keyboard so the delete key on both the regular keyboard
;; and the keypad delete the character under the cursor and to the right
;; under X, instead of the default, backspace behavior.
(global-set-key [delete] 'delete-char)
(global-set-key [kp-delete] 'delete-char)
;; My own key bindings ;;
;;(global-set-key [f1] 'compile)
;; Turn on font-lock mode for Emacs
(global-font-lock-mode t)
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(font-lock-comment-face ((nil (:foreground "red")))))
;;(setq require-final-newline t)
(setq require-final-newline nil)
;; Stop at the end of the file, not just add lines
(setq next-line-add-newlines nil)
;; Display columns
(setq column-number-mode t)
(setq inhibit-splash-screen t)
;; vim-Scroll
(setq scroll-conservatively 1)
;; Various
(setq auto-save-default nil)
(setq make-backup-files nil)
(setq display-time-24hr-format t)
(display-time-mode 1)
;; UTF-8 support (legacy workaround for Ubuntu)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
;; Programming section
;; Indentation
(setq-default c-basic-offset 4 tab-width 4 indent-tabs-mode nil)
;;(setq-default c-basic-offset 4 tab-width 4)
;; Default coding style
(setq c-default-style "bsd")
;; Don't attempt to guess the Python-indent
(setq python-indent-guess-indent-offset nil)
;; Enable which-function-mode for C, C++ and Python
;;(setq which-func-modes '(python-mode c-mode c++-mode))
;;(which-function-mode t)
;; Custom plugins
(add-to-list 'load-path "~/.emacs.d/lisp/")
;;PHP
;; (autoload 'php-mode "php-mode" "Mode for editing PHP source files")
;; (add-to-list 'auto-mode-alist '("\\.\\(inc\\|php[s34]?\\)" . php-mode))
;; YAML
;;(require 'yaml-mode)
;;(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
;; yasnippet
(require 'yasnippet)
(yas-global-mode 1)
(yas/load-directory "~/.emacs.d/snippets")
;; Python stuff
;; (pymacs-load "ropemacs" "rope-")
;; (setq ropemacs-enable-autoimport t)
;; CUA mode
;;(cua-mode t)
;;(setq cua-auto-tabify-rectangles nil)
;;(transient-mark-mode 1)
;;(cua-selection-mode t)
|