summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimeon Simeonov2019-05-22 09:15:02 +0200
committerSimeon Simeonov2019-05-22 09:15:02 +0200
commit415d6b9a9e26b7cb0ee8ca6d0ec384841b2359ec (patch)
tree41c310bfa9bb64512280e8da6024c176456c7288
parent4c26733f60877130c49bd79fff5fb1e02cff3b1c (diff)
Add .emacs.termfix
-rw-r--r--.emacs.termfix110
1 files changed, 110 insertions, 0 deletions
diff --git a/.emacs.termfix b/.emacs.termfix
new file mode 100644
index 0000000..d879257
--- /dev/null
+++ b/.emacs.termfix
@@ -0,0 +1,110 @@
1;; Set up the keyboard so the delete key on both the regular keyboard
2;; and the keypad delete the character under the cursor and to the right
3;; under X, instead of the default, backspace behavior.
4
5;; Added by Package.el. This must come before configurations of
6;; installed packages. Don't delete this line. If you don't want it,
7;; just comment it out by adding a semicolon to the start of the line.
8;; You may delete these explanatory comments.
9;;(package-initialize)
10
11(global-set-key [delete] 'delete-char)
12(global-set-key [kp-delete] 'delete-char)
13
14(global-set-key (kbd "S-C-<left>") 'shrink-window-horizontally)
15(global-set-key (kbd "S-C-<right>") 'enlarge-window-horizontally)
16
17;; My own key bindings ;;
18;;(global-set-key [f1] 'compile)
19
20;; Turn on font-lock mode for Emacs
21(global-font-lock-mode t)
22
23;; custom-set-faces was added by Custom.
24;; If you edit it by hand, you could mess it up, so be careful.
25;; Your init file should contain only one such instance.
26;; If there is more than one, they won't work right.
27(custom-set-faces
28 ;; custom-set-faces was added by Custom.
29 ;; If you edit it by hand, you could mess it up, so be careful.
30 ;; Your init file should contain only one such instance.
31 ;; If there is more than one, they won't work right.
32 '(error ((nil (:foreground "Red1"))))
33 '(font-lock-builtin-face ((nil (:foreground "dark slate blue"))))
34 '(font-lock-comment-face ((nil (:foreground "Firebrick"))))
35 '(font-lock-constant-face ((nil (:foreground "dark cyan"))))
36 '(font-lock-function-name-face ((nil (:foreground "Blue1"))))
37 '(font-lock-keyword-face ((nil (:foreground "Purple"))))
38 '(font-lock-string-face ((nil (:foreground "VioletRed4"))))
39 '(font-lock-type-face ((nil (:foreground "ForestGreen"))))
40 '(font-lock-variable-name-face ((nil (:foreground "sienna"))))
41 '(font-lock-warning-face ((nil (:foreground "Red1"))))
42 '(warning ((nil (:foreground "DarkOrange"))))
43 )
44
45;;(setq require-final-newline t)
46(setq require-final-newline nil)
47;; Stop at the end of the file, not just add lines
48(setq next-line-add-newlines nil)
49
50;; Display columns
51(setq column-number-mode t)
52(setq inhibit-splash-screen t)
53
54;; vim-Scroll
55(setq scroll-conservatively 1)
56
57;; Various
58(setq auto-save-default nil)
59(setq make-backup-files nil)
60(setq display-time-24hr-format t)
61(display-time-mode 1)
62
63;; UTF-8 support (legacy workaround for Ubuntu)
64(set-default-coding-systems 'utf-8)
65(set-terminal-coding-system 'utf-8)
66(set-keyboard-coding-system 'utf-8)
67
68(put 'downcase-region 'disabled nil)
69
70
71;; Programming section
72
73;; Indentation
74(setq-default c-basic-offset 4 tab-width 4 indent-tabs-mode nil)
75;;(setq-default c-basic-offset 4 tab-width 4)
76
77;; Default coding style
78(setq c-default-style "bsd")
79
80;; Don't attempt to guess the Python-indent
81(setq python-indent-guess-indent-offset nil)
82
83;; Bind .ino (Arduino project) extension to C++ mode
84(add-to-list 'auto-mode-alist '("\\.ino\\'" . c++-mode))
85
86;; Enable which-function-mode for C, C++ and Python
87(setq which-func-modes '(c-mode c++-mode java-mode python-mode))
88(which-function-mode t)
89
90
91;; Custom plugins
92(add-to-list 'load-path "~/.emacs.d/lisp/")
93
94;; PHP
95;; (autoload 'php-mode "php-mode" "Mode for editing PHP source files")
96;; (add-to-list 'auto-mode-alist '("\\.\\(inc\\|php[s34]?\\)" . php-mode))
97
98;; Lua
99(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
100(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
101;;(add-to-list 'interpreter-mode-alist '("lua" . lua-mode))
102
103;; YAML
104(require 'yaml-mode)
105(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
106
107;; yasnippet
108(require 'yasnippet)
109(yas-global-mode 1)
110(yas/load-directory "~/.emacs.d/snippets")