diff options
| -rw-r--r-- | .emacs | 80 | ||||
| -rw-r--r-- | .emacs.d/mysnippets/text-mode/python-mode/mprop | 21 | ||||
| -rw-r--r-- | .emacs.d/mysnippets/text-mode/python-mode/mpropg | 10 | ||||
| -rw-r--r-- | .emacs.d/mysnippets/text-mode/python-mode/mpropsg | 16 |
4 files changed, 127 insertions, 0 deletions
| @@ -0,0 +1,80 @@ | |||
| 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 | (global-set-key [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 | |||
| 12 | ;; My own key bindings ;; | ||
| 13 | ;;(global-set-key [f1] 'compile) | ||
| 14 | ;;(global-set-key [f2] 'delete-other-windows) | ||
| 15 | |||
| 16 | |||
| 17 | ;; Turn on font-lock mode for Emacs | ||
| 18 | (global-font-lock-mode t) | ||
| 19 | |||
| 20 | |||
| 21 | |||
| 22 | ;; Always end a file with a newline | ||
| 23 | ;;(setq require-final-newline t) | ||
| 24 | (setq require-final-newline nil) | ||
| 25 | |||
| 26 | |||
| 27 | (setq auto-save-default nil) | ||
| 28 | (setq default-tab-width 4) | ||
| 29 | (setq make-backup-files nil) | ||
| 30 | |||
| 31 | ;; Display columns | ||
| 32 | (setq column-number-mode t) | ||
| 33 | |||
| 34 | (setq inhibit-splash-screen t) | ||
| 35 | |||
| 36 | ;; indent to spaces only | ||
| 37 | (setq-default indent-tabs-mode nil) | ||
| 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 | |||
| 57 | |||
| 58 | ;; Needed in Ubuntu | ||
| 59 | (set-default-coding-systems 'utf-8) | ||
| 60 | (set-terminal-coding-system 'utf-8) | ||
| 61 | (set-keyboard-coding-system 'utf-8) | ||
| 62 | |||
| 63 | ;; vim-Scroll | ||
| 64 | (setq scroll-conservatively 1) | ||
| 65 | |||
| 66 | |||
| 67 | ;; (require 'pymacs) | ||
| 68 | ;; (pymacs-load "ropemacs" "rope-") | ||
| 69 | ;; (setq ropemacs-enable-autoimport t) | ||
| 70 | |||
| 71 | |||
| 72 | ;; (yas/initialize) | ||
| 73 | ;; (setq yas/root-directory '("~/.emacs.d/mysnippets" | ||
| 74 | ;; "/usr/share/emacs/site-lisp/yasnippet/snippets")) | ||
| 75 | ;; (mapc 'yas/load-directory yas/root-directory) | ||
| 76 | (yas/load-directory "~/.emacs.d/mysnippets") | ||
| 77 | |||
| 78 | |||
| 79 | (setq c-default-style "bsd" | ||
| 80 | c-basic-offset 2) | ||
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/mprop b/.emacs.d/mysnippets/text-mode/python-mode/mprop new file mode 100644 index 0000000..604f8b5 --- /dev/null +++ b/.emacs.d/mysnippets/text-mode/python-mode/mprop | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | #contributor : Simeon Simeonov <blackmore@pichove.org> | ||
| 2 | #name : @property foo ... getter & setter & deleter | ||
| 3 | # -- | ||
| 4 | @property | ||
| 5 | def ${1:foo}(self): | ||
| 6 | """ | ||
| 7 | """ | ||
| 8 | return self._$1 | ||
| 9 | |||
| 10 | @$1.setter | ||
| 11 | def $1(self, value): | ||
| 12 | """ | ||
| 13 | """ | ||
| 14 | self._$1 = value | ||
| 15 | |||
| 16 | @$1.deleter | ||
| 17 | def $1(self): | ||
| 18 | """ | ||
| 19 | """ | ||
| 20 | |||
| 21 | $0 | ||
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/mpropg b/.emacs.d/mysnippets/text-mode/python-mode/mpropg new file mode 100644 index 0000000..6fa9011 --- /dev/null +++ b/.emacs.d/mysnippets/text-mode/python-mode/mpropg | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | #contributor : Simeon Simeonov <blackmore@pichove.org> | ||
| 2 | #name : @property foo ... getter | ||
| 3 | # -- | ||
| 4 | @property | ||
| 5 | def ${1:foo}(self): | ||
| 6 | """ | ||
| 7 | """ | ||
| 8 | return self._$1 | ||
| 9 | |||
| 10 | $0 | ||
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/mpropsg b/.emacs.d/mysnippets/text-mode/python-mode/mpropsg new file mode 100644 index 0000000..3d515fa --- /dev/null +++ b/.emacs.d/mysnippets/text-mode/python-mode/mpropsg | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #contributor : Simeon Simeonov <blackmore@pichove.org> | ||
| 2 | #name : @property foo ... getter & setter | ||
| 3 | # -- | ||
| 4 | @property | ||
| 5 | def ${1:foo}(self): | ||
| 6 | """ | ||
| 7 | """ | ||
| 8 | return self._$1 | ||
| 9 | |||
| 10 | @$1.setter | ||
| 11 | def $1(self, value): | ||
| 12 | """ | ||
| 13 | """ | ||
| 14 | self._$1 = value | ||
| 15 | |||
| 16 | $0 | ||
