From 905ddda312c1535909c64bb261d4cf2a3edcb8ae Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Thu, 12 Nov 2015 08:42:14 +0100 Subject: Add printf (print('{}'.format() for Python) --- .emacs | 8 ++++---- .emacs.d/snippets/python-mode/printf | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .emacs.d/snippets/python-mode/printf diff --git a/.emacs b/.emacs index c1e37f3..9dab30b 100644 --- a/.emacs +++ b/.emacs @@ -58,8 +58,8 @@ (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) +;;(setq which-func-modes '(python-mode c-mode c++-mode)) +;;(which-function-mode t) ;; Custom plugins (add-to-list 'load-path "~/.emacs.d/lisp/") @@ -69,8 +69,8 @@ ;; (add-to-list 'auto-mode-alist '("\\.\\(inc\\|php[s34]?\\)" . php-mode)) ;; YAML -(require 'yaml-mode) -(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode)) +;;(require 'yaml-mode) +;;(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode)) ;; yasnippet (require 'yasnippet) diff --git a/.emacs.d/snippets/python-mode/printf b/.emacs.d/snippets/python-mode/printf new file mode 100644 index 0000000..78c67a8 --- /dev/null +++ b/.emacs.d/snippets/python-mode/printf @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: printf +# key: pf +# -- +print('$0{}'.format()) \ No newline at end of file -- cgit v1.3