From b045e27c545d4027811637193632ec3ea5ef7858 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Thu, 19 Sep 2013 16:21:37 +0200 Subject: Initial commit --- .emacs | 80 +++++++++++++++++++++++ .emacs.d/mysnippets/text-mode/python-mode/mprop | 21 ++++++ .emacs.d/mysnippets/text-mode/python-mode/mpropg | 10 +++ .emacs.d/mysnippets/text-mode/python-mode/mpropsg | 16 +++++ 4 files changed, 127 insertions(+) create mode 100644 .emacs create mode 100644 .emacs.d/mysnippets/text-mode/python-mode/mprop create mode 100644 .emacs.d/mysnippets/text-mode/python-mode/mpropg create mode 100644 .emacs.d/mysnippets/text-mode/python-mode/mpropsg diff --git a/.emacs b/.emacs new file mode 100644 index 0000000..b6b1f57 --- /dev/null +++ b/.emacs @@ -0,0 +1,80 @@ +;; 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) +;;(global-set-key (read-kbd-macro "C-c <") 'end-of-buffer) +(global-set-key [f1] 'comment-region) +(global-set-key [f2] 'uncomment-region) +;;(global-set-key "C-<<" 'end-of-buffer) + + +;; My own key bindings ;; +;;(global-set-key [f1] 'compile) +;;(global-set-key [f2] 'delete-other-windows) + + +;; Turn on font-lock mode for Emacs +(global-font-lock-mode t) + + + +;; Always end a file with a newline +;;(setq require-final-newline t) +(setq require-final-newline nil) + + +(setq auto-save-default nil) +(setq default-tab-width 4) +(setq make-backup-files nil) + +;; Display columns +(setq column-number-mode t) + +(setq inhibit-splash-screen t) + +;; indent to spaces only +(setq-default indent-tabs-mode nil) + +;; Stop at the end of the file, not just add lines +(setq next-line-add-newlines nil) + + +;; Customized font-lock-comment-face +(custom-set-variables + ;; custom-set-variables 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"))))) + + +;; Needed in Ubuntu +(set-default-coding-systems 'utf-8) +(set-terminal-coding-system 'utf-8) +(set-keyboard-coding-system 'utf-8) + +;; vim-Scroll +(setq scroll-conservatively 1) + + +;; (require 'pymacs) +;; (pymacs-load "ropemacs" "rope-") +;; (setq ropemacs-enable-autoimport t) + + +;; (yas/initialize) +;; (setq yas/root-directory '("~/.emacs.d/mysnippets" +;; "/usr/share/emacs/site-lisp/yasnippet/snippets")) +;; (mapc 'yas/load-directory yas/root-directory) +(yas/load-directory "~/.emacs.d/mysnippets") + + +(setq c-default-style "bsd" + 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 @@ +#contributor : Simeon Simeonov +#name : @property foo ... getter & setter & deleter +# -- +@property +def ${1:foo}(self): + """ + """ + return self._$1 + +@$1.setter +def $1(self, value): + """ + """ + self._$1 = value + +@$1.deleter +def $1(self): + """ + """ + +$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 @@ +#contributor : Simeon Simeonov +#name : @property foo ... getter +# -- +@property +def ${1:foo}(self): + """ + """ + return self._$1 + +$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 @@ +#contributor : Simeon Simeonov +#name : @property foo ... getter & setter +# -- +@property +def ${1:foo}(self): + """ + """ + return self._$1 + +@$1.setter +def $1(self, value): + """ + """ + self._$1 = value + +$0 -- cgit v1.3