added orgmode templates

This commit is contained in:
Abraham Raji 2020-01-14 22:14:39 +05:30
parent 22616f29a4
commit 3cff301da5
1 changed files with 12 additions and 0 deletions

View File

@ -96,3 +96,15 @@ Asterisk can be boring to look at.
(define-key org-mode-map (kbd "<f8>") 'org-tree-slide-mode)
(define-key org-mode-map (kbd "c-<f8>") 'org-tree-slide-skip-done-toggle)
#+END_SRC
** Easy-to-add emacs-lisp template
Hitting tab after an "<el" in an org-mode file will create a template for emacs-lisp insertion.
#+BEGIN_SRC emacs-lisp
(add-to-list 'org-structure-template-alist
'("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC"))
(add-to-list 'org-structure-template-alist
'("cp" "#+BEGIN_SRC c\n?\n#+END_SRC"))
(add-to-list 'org-structure-template-alist
'("py" "#+BEGIN_SRC python\n?\n#+END_SRC"))
(add-to-list 'org-structure-template-alist
'("base" "#+TITLE:\n#+AUTHOR: Abraham Raji\n#+EMAIL: abrahamraji99@gmail.com\n#+STARTUP: overview\n#+CREATOR: avronr\n#+LANGUAGE: en\n#+OPTIONS: num:nil\n"))
#+END_SRC