From d4737e55285fc2fbfaa1f573d701a2c4ddb06234 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Sun, 11 Aug 2024 21:04:53 -0700 Subject: [PATCH] Add new snippets --- snippets/org-mode/emacs-lisp-defun | 4 ++-- snippets/org-mode/emacs-lisp-defvar | 4 ++-- snippets/org-mode/header | 14 +++++--------- snippets/org-mode/name | 4 ++-- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/snippets/org-mode/emacs-lisp-defun b/snippets/org-mode/emacs-lisp-defun index c9d0cd3..90070d5 100644 --- a/snippets/org-mode/emacs-lisp-defun +++ b/snippets/org-mode/emacs-lisp-defun @@ -2,7 +2,7 @@ # name: emacs-lisp-test # key: #elt # -- -#+begin_src emacs-lisp +#+BEGIN_SRC emacs-lisp (ert-deftest $1-test () (should (= $0))) -#+end_src +#+END_SRC diff --git a/snippets/org-mode/emacs-lisp-defvar b/snippets/org-mode/emacs-lisp-defvar index b6d61e3..b965589 100644 --- a/snippets/org-mode/emacs-lisp-defvar +++ b/snippets/org-mode/emacs-lisp-defvar @@ -1,6 +1,6 @@ # key: slv # name: emacs-lisp-defvar # -- -+begin_src emacs-lisp ++BEGIN_SRC emacs-lisp (defvar ${1:symbol} ${2:initvalue} "${3:docstring}") -#+end_src \ No newline at end of file +#+END_SRC \ No newline at end of file diff --git a/snippets/org-mode/header b/snippets/org-mode/header index 55af17e..5c9ae24 100644 --- a/snippets/org-mode/header +++ b/snippets/org-mode/header @@ -1,11 +1,7 @@ # -*- mode: snippet -*- -# name: header -# key: header +# name: python-src-block +# key: #sp # -- -#+title: ${1:`(replace-regexp-in-string "-" " " (capitalize (file-name-nondirectory (file-name-sans-extension (buffer-file-name)))))`} -#+author: `(user-full-name)` -#+email: `user-mail-address` -#+date: `(format-time-string "%Y-%m-%d %B")` -#+tags: $2 - -$0 \ No newline at end of file +#+BEGIN_SRC python + $0 +#+END_SRC \ No newline at end of file diff --git a/snippets/org-mode/name b/snippets/org-mode/name index 14dcef5..6c1f935 100644 --- a/snippets/org-mode/name +++ b/snippets/org-mode/name @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: name -# key: name +# key: #n # -- -#+name: ${0} \ No newline at end of file +#+NAME: $0 \ No newline at end of file