From aa7fa9511c31159ad231abd0da6703941607ee59 Mon Sep 17 00:00:00 2001 From: Zelong Kuang Date: Sun, 16 Nov 2025 15:47:31 +1100 Subject: [PATCH] Initial commit --- config.el | 18 ++ config.org | 44 ++++ config_bak.el | 93 +++++++++ init.el | 197 ++++++++++++++++++ packages.el | 9 + snippets/.gitignore | 1 + snippets/emacs-lisp-mode/get-buffer | 5 + snippets/emacs-lisp-mode/get-buffer-create | 5 + snippets/emacs-lisp-mode/message | 5 + snippets/emacs-lisp-mode/paren-insert | 5 + snippets/emacs-lisp-mode/point-max | 5 + snippets/emacs-lisp-mode/pp | 5 + snippets/eshell-mode/for | 4 + .../inferior-emacs-lisp-mode/.yas-parents | 1 + .../.yas-ignore-filenames-as-triggers | 0 snippets/latex-mode/.yas-make-groups | 0 snippets/latex-mode/.yas-parents | 1 + snippets/latex-mode/2-vector | 4 + snippets/latex-mode/Basic template | 29 +++ snippets/latex-mode/Diagonal bmatrix | 10 + snippets/latex-mode/Display Math | 6 + snippets/latex-mode/Exists | 7 + snippets/latex-mode/Fraction auto | 16 ++ snippets/latex-mode/Fraction slash | 17 ++ snippets/latex-mode/Inline Math | 6 + snippets/latex-mode/Tikz Plot | 19 ++ snippets/latex-mode/To the power | 7 + snippets/latex-mode/^2 | 7 + snippets/latex-mode/^3 | 7 + snippets/latex-mode/abstract.yasnippet | 9 + snippets/latex-mode/adjoint | 7 + snippets/latex-mode/align.yasnippet | 9 + snippets/latex-mode/alignstar.yasnippet | 9 + snippets/latex-mode/arccos | 7 + snippets/latex-mode/arccot | 7 + snippets/latex-mode/arccsc | 7 + snippets/latex-mode/arcsec | 7 + snippets/latex-mode/arcsin | 7 + snippets/latex-mode/arctan | 7 + snippets/latex-mode/array.yasnippet | 9 + snippets/latex-mode/article.yasnippet | 28 +++ snippets/latex-mode/bar | 15 ++ snippets/latex-mode/basict | 17 ++ snippets/latex-mode/bbm1 | 5 + snippets/latex-mode/beamer.yasnippet | 37 ++++ snippets/latex-mode/begin.yasnippet | 10 + snippets/latex-mode/bib.yasnippet | 8 + snippets/latex-mode/big.yasnippet | 7 + snippets/latex-mode/bigop.yasnippet | 7 + snippets/latex-mode/binom.yasnippet | 7 + snippets/latex-mode/block.yasnippet | 9 + snippets/latex-mode/bmatrix (2 x 2) | 8 + snippets/latex-mode/bmatrix (3 x 3) | 8 + snippets/latex-mode/bold.yasnippet | 7 + snippets/latex-mode/case.yasnippet | 9 + snippets/latex-mode/cases | 9 + snippets/latex-mode/ceiling function | 7 + snippets/latex-mode/cha.yasnippet | 9 + snippets/latex-mode/chastar.yasnippet | 8 + snippets/latex-mode/cite.yasnippet | 7 + snippets/latex-mode/code | 7 + snippets/latex-mode/column vector | 7 + snippets/latex-mode/column-separator | 7 + snippets/latex-mode/columns | 13 ++ snippets/latex-mode/complex conjugate | 7 + snippets/latex-mode/coprod.yasnippet | 7 + snippets/latex-mode/cos | 7 + snippets/latex-mode/cot | 7 + snippets/latex-mode/csc | 7 + snippets/latex-mode/d-by-dt | 7 + snippets/latex-mode/ddots | 7 + snippets/latex-mode/definite integral | 7 + snippets/latex-mode/desc.yasnippet | 9 + snippets/latex-mode/doc.yasnippet | 10 + snippets/latex-mode/dots | 7 + snippets/latex-mode/em.yasnippet | 7 + snippets/latex-mode/enum.yasnippet | 9 + snippets/latex-mode/eq.yasnippet | 10 + snippets/latex-mode/eqs.yasnippet | 10 + snippets/latex-mode/equiv | 6 + snippets/latex-mode/exp | 7 + snippets/latex-mode/fig.yasnippet | 12 ++ snippets/latex-mode/floor function | 7 + snippets/latex-mode/forall | 6 + snippets/latex-mode/frac.yasnippet | 7 + snippets/latex-mode/frame.yasnippet | 9 + snippets/latex-mode/gls.yasnippet | 8 + snippets/latex-mode/graphics.yasnippet | 6 + snippets/latex-mode/greater greater | 7 + snippets/latex-mode/greater or equal | 7 + snippets/latex-mode/hat | 15 ++ snippets/latex-mode/href.yasnippet | 6 + snippets/latex-mode/if and only if | 6 + snippets/latex-mode/implied by | 7 + snippets/latex-mode/implies | 6 + snippets/latex-mode/in | 7 + snippets/latex-mode/includegraphics | 5 + snippets/latex-mode/infimum | 7 + snippets/latex-mode/int.yasnippet | 8 + snippets/latex-mode/inverse | 7 + snippets/latex-mode/it.yasnippet | 7 + snippets/latex-mode/itd.yasnippet | 7 + snippets/latex-mode/item.yasnippet | 9 + snippets/latex-mode/label.yasnippet | 7 + snippets/latex-mode/leftrightarrow | 7 + snippets/latex-mode/less or equal | 7 + snippets/latex-mode/lesser lesser | 7 + snippets/latex-mode/letter.yasnippet | 27 +++ snippets/latex-mode/lim.yasnippet | 7 + snippets/latex-mode/limit | 7 + snippets/latex-mode/limsup | 7 + snippets/latex-mode/listing | 7 + snippets/latex-mode/ln | 7 + snippets/latex-mode/log | 7 + snippets/latex-mode/math.yasnippet | 9 + snippets/latex-mode/matrix.yasnippet | 7 + snippets/latex-mode/minipage.yasnippet | 9 + snippets/latex-mode/newline | 8 + snippets/latex-mode/norm | 7 + snippets/latex-mode/not equal | 7 + snippets/latex-mode/not in | 7 + snippets/latex-mode/notexists | 6 + snippets/latex-mode/oplus | 6 + snippets/latex-mode/otimes | 7 + snippets/latex-mode/par.yasnippet | 9 + snippets/latex-mode/partial derivative | 7 + snippets/latex-mode/perp | 7 + snippets/latex-mode/prod.yasnippet | 7 + snippets/latex-mode/quad | 5 + snippets/latex-mode/ref.yasnippet | 7 + snippets/latex-mode/row vector | 7 + snippets/latex-mode/sc.yasnippet | 7 + snippets/latex-mode/sec | 7 + snippets/latex-mode/sec.yasnippet | 9 + snippets/latex-mode/secstar.yasnippet | 8 + snippets/latex-mode/set | 7 + snippets/latex-mode/similar | 7 + snippets/latex-mode/sin | 7 + snippets/latex-mode/ssub.yasnippet | 9 + snippets/latex-mode/ssubstar.yasnippet | 8 + snippets/latex-mode/stackrel | 6 + snippets/latex-mode/star | 7 + snippets/latex-mode/sub.yasnippet | 9 + snippets/latex-mode/subfig.yasnippet | 10 + snippets/latex-mode/subfloat | 10 + snippets/latex-mode/subset | 7 + snippets/latex-mode/substar.yasnippet | 8 + snippets/latex-mode/sum.yasnippet | 7 + snippets/latex-mode/supremum | 6 + snippets/latex-mode/table.yasnippet | 14 ++ snippets/latex-mode/tan | 7 + snippets/latex-mode/text-minus | 5 + snippets/latex-mode/therefore | 7 + snippets/latex-mode/times | 7 + snippets/latex-mode/to | 7 + snippets/latex-mode/tt.yasnippet | 7 + snippets/latex-mode/url.yasnippet | 7 + snippets/latex-mode/use.yasnippet | 7 + snippets/latex-mode/vdots | 7 + snippets/latex-mode/verb.yasnippet | 11 + snippets/lisp-interaction-mode/.yas-parents | 1 + snippets/matlab-mode/switch | 11 + snippets/minibuffer-mode/.yas-parents | 1 + snippets/org-mode/.yas-parents | 1 + snippets/org-mode/basic org header | 19 ++ snippets/org-mode/hash-plus | 6 + snippets/org-mode/latex_header_extra | 6 + snippets/org-mode/reveal-html-columns | 10 + snippets/org-mode/reveal-html-div | 7 + snippets/org-mode/reveal-html-span | 6 + snippets/org-mode/source block | 7 + snippets/org-mode/src-jupyter-python | 6 + snippets/org-mode/video template | 19 ++ 173 files changed, 1715 insertions(+) create mode 100644 config.el create mode 100644 config.org create mode 100644 config_bak.el create mode 100644 init.el create mode 100644 packages.el create mode 100644 snippets/.gitignore create mode 100644 snippets/emacs-lisp-mode/get-buffer create mode 100644 snippets/emacs-lisp-mode/get-buffer-create create mode 100644 snippets/emacs-lisp-mode/message create mode 100644 snippets/emacs-lisp-mode/paren-insert create mode 100644 snippets/emacs-lisp-mode/point-max create mode 100644 snippets/emacs-lisp-mode/pp create mode 100644 snippets/eshell-mode/for create mode 100644 snippets/inferior-emacs-lisp-mode/.yas-parents create mode 100644 snippets/latex-mode/.yas-ignore-filenames-as-triggers create mode 100644 snippets/latex-mode/.yas-make-groups create mode 100644 snippets/latex-mode/.yas-parents create mode 100644 snippets/latex-mode/2-vector create mode 100644 snippets/latex-mode/Basic template create mode 100644 snippets/latex-mode/Diagonal bmatrix create mode 100644 snippets/latex-mode/Display Math create mode 100644 snippets/latex-mode/Exists create mode 100644 snippets/latex-mode/Fraction auto create mode 100644 snippets/latex-mode/Fraction slash create mode 100644 snippets/latex-mode/Inline Math create mode 100644 snippets/latex-mode/Tikz Plot create mode 100644 snippets/latex-mode/To the power create mode 100644 snippets/latex-mode/^2 create mode 100644 snippets/latex-mode/^3 create mode 100644 snippets/latex-mode/abstract.yasnippet create mode 100644 snippets/latex-mode/adjoint create mode 100644 snippets/latex-mode/align.yasnippet create mode 100644 snippets/latex-mode/alignstar.yasnippet create mode 100644 snippets/latex-mode/arccos create mode 100644 snippets/latex-mode/arccot create mode 100644 snippets/latex-mode/arccsc create mode 100644 snippets/latex-mode/arcsec create mode 100644 snippets/latex-mode/arcsin create mode 100644 snippets/latex-mode/arctan create mode 100644 snippets/latex-mode/array.yasnippet create mode 100644 snippets/latex-mode/article.yasnippet create mode 100644 snippets/latex-mode/bar create mode 100644 snippets/latex-mode/basict create mode 100644 snippets/latex-mode/bbm1 create mode 100644 snippets/latex-mode/beamer.yasnippet create mode 100644 snippets/latex-mode/begin.yasnippet create mode 100644 snippets/latex-mode/bib.yasnippet create mode 100644 snippets/latex-mode/big.yasnippet create mode 100644 snippets/latex-mode/bigop.yasnippet create mode 100644 snippets/latex-mode/binom.yasnippet create mode 100644 snippets/latex-mode/block.yasnippet create mode 100644 snippets/latex-mode/bmatrix (2 x 2) create mode 100644 snippets/latex-mode/bmatrix (3 x 3) create mode 100644 snippets/latex-mode/bold.yasnippet create mode 100644 snippets/latex-mode/case.yasnippet create mode 100644 snippets/latex-mode/cases create mode 100644 snippets/latex-mode/ceiling function create mode 100644 snippets/latex-mode/cha.yasnippet create mode 100644 snippets/latex-mode/chastar.yasnippet create mode 100644 snippets/latex-mode/cite.yasnippet create mode 100644 snippets/latex-mode/code create mode 100644 snippets/latex-mode/column vector create mode 100644 snippets/latex-mode/column-separator create mode 100644 snippets/latex-mode/columns create mode 100644 snippets/latex-mode/complex conjugate create mode 100644 snippets/latex-mode/coprod.yasnippet create mode 100644 snippets/latex-mode/cos create mode 100644 snippets/latex-mode/cot create mode 100644 snippets/latex-mode/csc create mode 100644 snippets/latex-mode/d-by-dt create mode 100644 snippets/latex-mode/ddots create mode 100644 snippets/latex-mode/definite integral create mode 100644 snippets/latex-mode/desc.yasnippet create mode 100644 snippets/latex-mode/doc.yasnippet create mode 100644 snippets/latex-mode/dots create mode 100644 snippets/latex-mode/em.yasnippet create mode 100644 snippets/latex-mode/enum.yasnippet create mode 100644 snippets/latex-mode/eq.yasnippet create mode 100644 snippets/latex-mode/eqs.yasnippet create mode 100644 snippets/latex-mode/equiv create mode 100644 snippets/latex-mode/exp create mode 100644 snippets/latex-mode/fig.yasnippet create mode 100644 snippets/latex-mode/floor function create mode 100644 snippets/latex-mode/forall create mode 100644 snippets/latex-mode/frac.yasnippet create mode 100644 snippets/latex-mode/frame.yasnippet create mode 100644 snippets/latex-mode/gls.yasnippet create mode 100644 snippets/latex-mode/graphics.yasnippet create mode 100644 snippets/latex-mode/greater greater create mode 100644 snippets/latex-mode/greater or equal create mode 100644 snippets/latex-mode/hat create mode 100644 snippets/latex-mode/href.yasnippet create mode 100644 snippets/latex-mode/if and only if create mode 100644 snippets/latex-mode/implied by create mode 100644 snippets/latex-mode/implies create mode 100644 snippets/latex-mode/in create mode 100644 snippets/latex-mode/includegraphics create mode 100644 snippets/latex-mode/infimum create mode 100644 snippets/latex-mode/int.yasnippet create mode 100644 snippets/latex-mode/inverse create mode 100644 snippets/latex-mode/it.yasnippet create mode 100644 snippets/latex-mode/itd.yasnippet create mode 100644 snippets/latex-mode/item.yasnippet create mode 100644 snippets/latex-mode/label.yasnippet create mode 100644 snippets/latex-mode/leftrightarrow create mode 100644 snippets/latex-mode/less or equal create mode 100644 snippets/latex-mode/lesser lesser create mode 100644 snippets/latex-mode/letter.yasnippet create mode 100644 snippets/latex-mode/lim.yasnippet create mode 100644 snippets/latex-mode/limit create mode 100644 snippets/latex-mode/limsup create mode 100644 snippets/latex-mode/listing create mode 100644 snippets/latex-mode/ln create mode 100644 snippets/latex-mode/log create mode 100644 snippets/latex-mode/math.yasnippet create mode 100644 snippets/latex-mode/matrix.yasnippet create mode 100644 snippets/latex-mode/minipage.yasnippet create mode 100644 snippets/latex-mode/newline create mode 100644 snippets/latex-mode/norm create mode 100644 snippets/latex-mode/not equal create mode 100644 snippets/latex-mode/not in create mode 100644 snippets/latex-mode/notexists create mode 100644 snippets/latex-mode/oplus create mode 100644 snippets/latex-mode/otimes create mode 100644 snippets/latex-mode/par.yasnippet create mode 100644 snippets/latex-mode/partial derivative create mode 100644 snippets/latex-mode/perp create mode 100644 snippets/latex-mode/prod.yasnippet create mode 100644 snippets/latex-mode/quad create mode 100644 snippets/latex-mode/ref.yasnippet create mode 100644 snippets/latex-mode/row vector create mode 100644 snippets/latex-mode/sc.yasnippet create mode 100644 snippets/latex-mode/sec create mode 100644 snippets/latex-mode/sec.yasnippet create mode 100644 snippets/latex-mode/secstar.yasnippet create mode 100644 snippets/latex-mode/set create mode 100644 snippets/latex-mode/similar create mode 100644 snippets/latex-mode/sin create mode 100644 snippets/latex-mode/ssub.yasnippet create mode 100644 snippets/latex-mode/ssubstar.yasnippet create mode 100644 snippets/latex-mode/stackrel create mode 100644 snippets/latex-mode/star create mode 100644 snippets/latex-mode/sub.yasnippet create mode 100644 snippets/latex-mode/subfig.yasnippet create mode 100644 snippets/latex-mode/subfloat create mode 100644 snippets/latex-mode/subset create mode 100644 snippets/latex-mode/substar.yasnippet create mode 100644 snippets/latex-mode/sum.yasnippet create mode 100644 snippets/latex-mode/supremum create mode 100644 snippets/latex-mode/table.yasnippet create mode 100644 snippets/latex-mode/tan create mode 100644 snippets/latex-mode/text-minus create mode 100644 snippets/latex-mode/therefore create mode 100644 snippets/latex-mode/times create mode 100644 snippets/latex-mode/to create mode 100644 snippets/latex-mode/tt.yasnippet create mode 100644 snippets/latex-mode/url.yasnippet create mode 100644 snippets/latex-mode/use.yasnippet create mode 100644 snippets/latex-mode/vdots create mode 100644 snippets/latex-mode/verb.yasnippet create mode 100644 snippets/lisp-interaction-mode/.yas-parents create mode 100644 snippets/matlab-mode/switch create mode 100644 snippets/minibuffer-mode/.yas-parents create mode 100644 snippets/org-mode/.yas-parents create mode 100644 snippets/org-mode/basic org header create mode 100644 snippets/org-mode/hash-plus create mode 100644 snippets/org-mode/latex_header_extra create mode 100644 snippets/org-mode/reveal-html-columns create mode 100644 snippets/org-mode/reveal-html-div create mode 100644 snippets/org-mode/reveal-html-span create mode 100644 snippets/org-mode/source block create mode 100644 snippets/org-mode/src-jupyter-python create mode 100644 snippets/org-mode/video template diff --git a/config.el b/config.el new file mode 100644 index 0000000..bd37f18 --- /dev/null +++ b/config.el @@ -0,0 +1,18 @@ +(setq doom-font (font-spec :family "Maple Mono" :size 20)) +(add-to-list 'default-frame-alist '(height . 53)) +(add-to-list 'default-frame-alist '(width . 120)) +(setq doom-theme 'doom-one) +(setq display-line-numbers-type 'relative) +(setq org-directory "~/org/") + +(after! yasnippet + (defun my-yas-try-expanding-auto-snippets () + (when yas-minor-mode + (let ((yas-buffer-local-condition ''(require-snippet-condition . auto))) + (yas-expand)))) + (add-hook 'post-command-hook #'my-yas-try-expanding-auto-snippets)) + +(after! eat + (when (eq system-type 'darwin) + (define-key eat-semi-char-mode-map (kbd "C-h") #'eat-self-input) + (define-key eat-semi-char-mode-map (kbd "") (kbd "C-h")))) diff --git a/config.org b/config.org new file mode 100644 index 0000000..c81d613 --- /dev/null +++ b/config.org @@ -0,0 +1,44 @@ +* My doom config + +** Appearance settings +#+begin_src emacs-lisp +(setq doom-font (font-spec :family "Maple Mono" :size 20)) +(add-to-list 'default-frame-alist '(height . 53)) +(add-to-list 'default-frame-alist '(width . 120)) +(setq doom-theme 'doom-one) +(setq display-line-numbers-type 'relative) +(setq org-directory "~/org/") +#+end_src + +** Plugins +*** Yasnippet +This enables the feature of auto-expanding snippets when matching the pattern +#+begin_src emacs-lisp +(after! yasnippet + (defun my-yas-try-expanding-auto-snippets () + (when yas-minor-mode + (let ((yas-buffer-local-condition ''(require-snippet-condition . auto))) + (yas-expand)))) + (add-hook 'post-command-hook #'my-yas-try-expanding-auto-snippets)) +#+end_src + +*** Eat +#+begin_src emacs-lisp :tangle packages.el +(package! eat + :recipe (:type git + :host codeberg + :repo "akib/emacs-eat" + :files ("*.el" ("term" "term/*.el") "*.texi" + "*.ti" ("terminfo/e" "terminfo/e/*") + ("terminfo/65" "terminfo/65/*") + ("integration" "integration/*") + (:exclude ".dir-locals.el" "*-tests.el")))) +#+end_src + +Fix the issue that backspace doesn't work on mac +#+begin_src emacs-lisp +(after! eat + (when (eq system-type 'darwin) + (define-key eat-semi-char-mode-map (kbd "C-h") #'eat-self-input) + (define-key eat-semi-char-mode-map (kbd "") (kbd "C-h")))) +#+end_src diff --git a/config_bak.el b/config_bak.el new file mode 100644 index 0000000..86197f3 --- /dev/null +++ b/config_bak.el @@ -0,0 +1,93 @@ +;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- + +;; Place your private configuration here! Remember, you do not need to run 'doom +;; sync' after modifying this file! + + +;; Some functionality uses this to identify you, e.g. GPG configuration, email +;; clients, file templates and snippets. It is optional. +;; (setq user-full-name "John Doe" +;; user-mail-address "john@doe.com") + +;; Doom exposes five (optional) variables for controlling fonts in Doom: +;; +;; - `doom-font' -- the primary font to use +;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable) +;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for +;; presentations or streaming. +;; - `doom-symbol-font' -- for symbols +;; - `doom-serif-font' -- for the `fixed-pitch-serif' face +;; +;; See 'C-h v doom-font' for documentation and more examples of what they +;; accept. For example: +;; +(setq doom-font (font-spec :family "Maple Mono" :size 20)) +(add-to-list 'default-frame-alist '(height . 53)) +(add-to-list 'default-frame-alist '(width . 120)) +;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light) +;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13)) +;; +;; If you or Emacs can't find your font, use 'M-x describe-font' to look them +;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to +;; refresh your font settings. If Emacs still can't find your font, it likely +;; wasn't installed correctly. Font issues are rarely Doom issues! + +;; There are two ways to load a theme. Both assume the theme is installed and +;; available. You can either set `doom-theme' or manually load a theme with the +;; `load-theme' function. This is the default: +(setq doom-theme 'doom-one) + + + +;; This determines the style of line numbers in effect. If set to `nil', line +;; numbers are disabled. For relative line numbers, set this to `relative'. +(setq display-line-numbers-type t) + +;; If you use `org' and don't want your org files in the default location below, +;; change `org-directory'. It must be set before org loads! +(setq org-directory "~/org/") + + +;; Whenever you reconfigure a package, make sure to wrap your config in an +;; `after!' block, otherwise Doom's defaults may override your settings. E.g. +;; +;; (after! PACKAGE +;; (setq x y)) +;; +;; The exceptions to this rule: +;; +;; - Setting file/directory variables (like `org-directory') +;; - Setting variables which explicitly tell you to set them before their +;; package is loaded (see 'C-h v VARIABLE' to look up their documentation). +;; - Setting doom variables (which start with 'doom-' or '+'). +;; +;; Here are some additional functions/macros that will help you configure Doom. +;; +;; - `load!' for loading external *.el files relative to this one +;; - `use-package!' for configuring packages +;; - `after!' for running code after a package has loaded +;; - `add-load-path!' for adding directories to the `load-path', relative to +;; this file. Emacs searches the `load-path' when you load packages with +;; `require' or `use-package'. +;; - `map!' for binding new keys +;; +;; To get information about any of these functions/macros, move the cursor over +;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k'). +;; This will open documentation for it, including demos of how they are used. +;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces, +;; etc). +;; +;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how +;; they are implemented. + +(after! yasnippet + (defun my-yas-try-expanding-auto-snippets () + (when yas-minor-mode + (let ((yas-buffer-local-condition ''(require-snippet-condition . auto))) + (yas-expand)))) + (add-hook 'post-command-hook #'my-yas-try-expanding-auto-snippets)) + +(after! eat + (when (eq system-type 'darwin) + (define-key eat-semi-char-mode-map (kbd "C-h") #'eat-self-input) + (define-key eat-semi-char-mode-map (kbd "") (kbd "C-h")))) diff --git a/init.el b/init.el new file mode 100644 index 0000000..8caa500 --- /dev/null +++ b/init.el @@ -0,0 +1,197 @@ +;;; init.el -*- lexical-binding: t; -*- + +;; This file controls what Doom modules are enabled and what order they load +;; in. Remember to run 'doom sync' after modifying it! + +;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's +;; documentation. There you'll find a link to Doom's Module Index where all +;; of our modules are listed, including what flags they support. + +;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or +;; 'C-c c k' for non-vim users) to view its documentation. This works on +;; flags as well (those symbols that start with a plus). +;; +;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its +;; directory (for easy access to its source code). + +(doom! :input + ;;bidi ; (tfel ot) thgir etirw uoy gnipleh + ;;chinese + ;;japanese + ;;layout ; auie,ctsrnm is the superior home row + :completion + ;;company ; the ultimate code completion backend + (corfu +orderless) ; complete with cap(f), cape and a flying feather! + ;;helm ; the *other* search engine for love and life + ;;ido ; the other *other* search engine... + ;;ivy ; a search engine for love and life + vertico ; the search engine of the future + + :ui + ;;deft ; notational velocity for Emacs + doom ; what makes DOOM look the way it does + doom-dashboard ; a nifty splash screen for Emacs + ;;doom-quit ; DOOM quit-message prompts when you quit Emacs + (emoji +unicode) ; 🙂 + hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW + indent-guides ; highlighted indent columns + ligatures ; ligatures and symbols to make your code pretty again + ;;minimap ; show a map of the code on the side + modeline ; snazzy, Atom-inspired modeline, plus API + ;;nav-flash ; blink cursor line after big motions + ;;neotree ; a project drawer, like NERDTree for vim + ophints ; highlight the region an operation acts on + (popup +defaults) ; tame sudden yet inevitable temporary windows + ;;smooth-scroll ; So smooth you won't believe it's not butter + tabs ; a tab bar for Emacs + treemacs ; a project drawer, like neotree but cooler + unicode ; extended unicode support for various languages + (vc-gutter +pretty) ; vcs diff in the fringe + vi-tilde-fringe ; fringe tildes to mark beyond EOB + ;;window-select ; visually switch windows + workspaces ; tab emulation, persistence & separate workspaces + ;;zen ; distraction-free coding or writing + + :editor + (evil +everywhere); come to the dark side, we have cookies + file-templates ; auto-snippets for empty files + fold ; (nigh) universal code folding + ;;(format +onsave) ; automated prettiness + ;;god ; run Emacs commands without modifier keys + ;;lispy ; vim for lisp, for people who don't like vim + ;;multiple-cursors ; editing in many places at once + ;;objed ; text object editing for the innocent + ;;parinfer ; turn lisp into python, sort of + ;;rotate-text ; cycle region at point between text candidates + snippets ; my elves. They type so I don't have to + (whitespace +guess +trim) ; a butler for your whitespace + ;;word-wrap ; soft wrapping with language-aware indent + + :emacs + dired ; making dired pretty [functional] + electric ; smarter, keyword-based electric-indent + ;;eww ; the internet is gross + ibuffer ; interactive buffer management + tramp ; remote files at your arthritic fingertips + undo ; persistent, smarter undo for your inevitable mistakes + vc ; version-control and Emacs, sitting in a tree + + :term + eshell ; the elisp shell that works everywhere + ;;shell ; simple shell REPL for Emacs + ;; term ; basic terminal emulator for Emacs + ;; vterm ; the best terminal emulation in Emacs + + :checkers + syntax ; tasing you for every semicolon you forget + ;;(spell +flyspell) ; tasing you for misspelling mispelling + ;;grammar ; tasing grammar mistake every you make + + :tools + ;;ansible + ;;biblio ; Writes a PhD for you (citation needed) + ;;collab ; buffers with friends + ;;debugger ; FIXME stepping through code, to help you add bugs + direnv + docker + ;; editorconfig ; let someone else argue about tabs vs spaces + ;;ein ; tame Jupyter notebooks with emacs + (eval +overlay) ; run code, run (also, repls) + lookup ; navigate your code and its documentation + ;;llm ; when I said you needed friends, I didn't mean... + (lsp +eglot +peek) ; M-x vscode + magit ; a git porcelain for Emacs + make ; run make tasks from Emacs + ;;pass ; password manager for nerds + ;; pdf ; pdf enhancements + ;;terraform ; infrastructure as code + tmux ; an API for interacting with tmux + tree-sitter ; syntax and parsing, sitting in a tree... + upload ; map local to remote projects via ssh/ftp + + :os + (:if (featurep :system 'macos) macos) ; improve compatibility with macOS + ;;tty ; improve the terminal Emacs experience + + :lang + ;;ada ; In strong typing we (blindly) trust + ;;agda ; types of types of types of types... + ;;beancount ; mind the GAAP + (cc +lsp) ; C > C++ == 1 + ;;clojure ; java with a lisp + ;;common-lisp ; if you've seen one lisp, you've seen them all + ;;coq ; proofs-as-programs + ;;crystal ; ruby at the speed of c + ;;csharp ; unity, .NET, and mono shenanigans + data ; config/data formats + ;;(dart +flutter) ; paint ui and not much else + ;;dhall + ;;elixir ; erlang done right + ;;elm ; care for a cup of TEA? + emacs-lisp ; drown in parentheses + ;;erlang ; an elegant language for a more civilized age + ;;ess ; emacs speaks statistics + ;;factor + ;;faust ; dsp, but you get to keep your soul + ;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER) + ;;fsharp ; ML stands for Microsoft's Language + ;;fstar ; (dependent) types and (monadic) effects and Z3 + ;;gdscript ; the language you waited for + ;;(go +lsp) ; the hipster dialect + ;;(graphql +lsp) ; Give queries a REST + ;;(haskell +lsp) ; a language that's lazier than I am + ;;hy ; readability of scheme w/ speed of python + ;;idris ; a language you can depend on + json ; At least it ain't XML + ;;janet ; Fun fact: Janet is me! + ;;(java +lsp) ; the poster child for carpal tunnel syndrome + ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) + ;;julia ; a better, faster MATLAB + ;;kotlin ; a better, slicker Java(Script) + latex ; writing papers in Emacs has never been so fun + lean ; for folks with too much to prove + ;;ledger ; be audit you can be + ;; lua ; one-based indices? one-based indices + markdown ; writing docs for people to ignore + ;;nim ; python + lisp at the speed of c + ;;nix ; I hereby declare "nix geht mehr!" + ;;ocaml ; an objective camel + org ; organize your plain life in plain text + ;;php ; perl's insecure younger brother + ;;plantuml ; diagrams for confusing people more + ;; graphviz ; diagrams for confusing yourself even more + ;;purescript ; javascript, but functional + python ; beautiful is better than ugly + ;;qt ; the 'cutest' gui framework ever + ;;racket ; a DSL for DSLs + ;;raku ; the artist formerly known as perl6 + ;;rest ; Emacs as a REST client + ;;rst ; ReST in peace + ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} + ;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + ;;scala ; java, but good + ;;(scheme +guile) ; a fully conniving family of lisps + sh ; she sells {ba,z,fi}sh shells on the C xor + ;;sml + ;;solidity ; do you need a blockchain? No. + ;;swift ; who asked for emoji variables? + ;;terra ; Earth and Moon in alignment for performance. + ;;web ; the tubes + yaml ; JSON, but readable + ;;zig ; C, but simpler + + :email + ;;(mu4e +org +gmail) + ;;notmuch + ;;(wanderlust +gmail) + + :app + ;;calendar + ;;emms + ;;everywhere ; *leave* Emacs!? You must be joking + ;;irc ; how neckbeards socialize + ;;(rss +org) ; emacs as an RSS reader + + :config + literate + (default +bindings +smartparens)) diff --git a/packages.el b/packages.el new file mode 100644 index 0000000..5c9d289 --- /dev/null +++ b/packages.el @@ -0,0 +1,9 @@ +(package! eat + :recipe (:type git + :host codeberg + :repo "akib/emacs-eat" + :files ("*.el" ("term" "term/*.el") "*.texi" + "*.ti" ("terminfo/e" "terminfo/e/*") + ("terminfo/65" "terminfo/65/*") + ("integration" "integration/*") + (:exclude ".dir-locals.el" "*-tests.el")))) diff --git a/snippets/.gitignore b/snippets/.gitignore new file mode 100644 index 0000000..abf136d --- /dev/null +++ b/snippets/.gitignore @@ -0,0 +1 @@ +*.el diff --git a/snippets/emacs-lisp-mode/get-buffer b/snippets/emacs-lisp-mode/get-buffer new file mode 100644 index 0000000..203573f --- /dev/null +++ b/snippets/emacs-lisp-mode/get-buffer @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: get-buffer +# key: gb +# -- +(get-buffer "${1:`(read-buffer "Buffer:")`}")$0 \ No newline at end of file diff --git a/snippets/emacs-lisp-mode/get-buffer-create b/snippets/emacs-lisp-mode/get-buffer-create new file mode 100644 index 0000000..46f1d67 --- /dev/null +++ b/snippets/emacs-lisp-mode/get-buffer-create @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: get-buffer-create +# key: gbc +# -- +(get-buffer-create $0) \ No newline at end of file diff --git a/snippets/emacs-lisp-mode/message b/snippets/emacs-lisp-mode/message new file mode 100644 index 0000000..005a30c --- /dev/null +++ b/snippets/emacs-lisp-mode/message @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: message +# key: msg +# -- +(message ${1:(format "$2")})$0 \ No newline at end of file diff --git a/snippets/emacs-lisp-mode/paren-insert b/snippets/emacs-lisp-mode/paren-insert new file mode 100644 index 0000000..f3a12a6 --- /dev/null +++ b/snippets/emacs-lisp-mode/paren-insert @@ -0,0 +1,5 @@ +# key: mk +# name: paren-insert +# condition: 'auto +# -- +($0) \ No newline at end of file diff --git a/snippets/emacs-lisp-mode/point-max b/snippets/emacs-lisp-mode/point-max new file mode 100644 index 0000000..109b262 --- /dev/null +++ b/snippets/emacs-lisp-mode/point-max @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: point-max +# key: pM +# -- +(point-max) \ No newline at end of file diff --git a/snippets/emacs-lisp-mode/pp b/snippets/emacs-lisp-mode/pp new file mode 100644 index 0000000..6cd299a --- /dev/null +++ b/snippets/emacs-lisp-mode/pp @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: pp +# key: pp +# -- +(pp $3 $1)$0 \ No newline at end of file diff --git a/snippets/eshell-mode/for b/snippets/eshell-mode/for new file mode 100644 index 0000000..bfa3b35 --- /dev/null +++ b/snippets/eshell-mode/for @@ -0,0 +1,4 @@ +#name : Eshell for loop +#key : for +# -- +for f in ${1:*} { ${2:echo} "$f"; $3} $0 \ No newline at end of file diff --git a/snippets/inferior-emacs-lisp-mode/.yas-parents b/snippets/inferior-emacs-lisp-mode/.yas-parents new file mode 100644 index 0000000..a7ee2e7 --- /dev/null +++ b/snippets/inferior-emacs-lisp-mode/.yas-parents @@ -0,0 +1 @@ +emacs-lisp-mode \ No newline at end of file diff --git a/snippets/latex-mode/.yas-ignore-filenames-as-triggers b/snippets/latex-mode/.yas-ignore-filenames-as-triggers new file mode 100644 index 0000000..e69de29 diff --git a/snippets/latex-mode/.yas-make-groups b/snippets/latex-mode/.yas-make-groups new file mode 100644 index 0000000..e69de29 diff --git a/snippets/latex-mode/.yas-parents b/snippets/latex-mode/.yas-parents new file mode 100644 index 0000000..eed5b44 --- /dev/null +++ b/snippets/latex-mode/.yas-parents @@ -0,0 +1 @@ +text-mode diff --git a/snippets/latex-mode/2-vector b/snippets/latex-mode/2-vector new file mode 100644 index 0000000..4ffe1e4 --- /dev/null +++ b/snippets/latex-mode/2-vector @@ -0,0 +1,4 @@ +# key: vec2 +# name: 2-vector +# -- +\\begin{bmatrix} ${1:x}_{${2:1}} \\\\ ${3:$1}_{${4:2}} \\end{bmatrix} \ No newline at end of file diff --git a/snippets/latex-mode/Basic template b/snippets/latex-mode/Basic template new file mode 100644 index 0000000..6492e8a --- /dev/null +++ b/snippets/latex-mode/Basic template @@ -0,0 +1,29 @@ +# key: template +# name: Basic template +# group: skeleton +# -- +\input{`my-preamble-file`} +% \usepackage{hyperref} +% \hypersetup{ +% colorlinks, +% citecolor=cyan, +% filecolor=black, +% linkcolor=blue, +% urlcolor=black} + +\author{`user-full-name`\vspace{-2ex}} +\title{\vspace{-3.0cm}${1:Title$(capitalize yas-text)}\vspace{-2ex}} +${2:\date{${3:\today}}} + +\begin{document} + +\begingroup +\let\center\flushleft +\let\endcenter\endflushleft +\maketitle +\endgroup + +% \tableofcontents + +$0 +\end{document} \ No newline at end of file diff --git a/snippets/latex-mode/Diagonal bmatrix b/snippets/latex-mode/Diagonal bmatrix new file mode 100644 index 0000000..0947046 --- /dev/null +++ b/snippets/latex-mode/Diagonal bmatrix @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: Diagonal bmatrix +# key: diag3 +# group: math +# -- +\\begin{bmatrix} +${1:\\ddots} & & \\\\ + & ${2:\\ddots} & \\\\ + & & ${3:\\ddots} + \\end{bmatrix} \ No newline at end of file diff --git a/snippets/latex-mode/Display Math b/snippets/latex-mode/Display Math new file mode 100644 index 0000000..3e830b0 --- /dev/null +++ b/snippets/latex-mode/Display Math @@ -0,0 +1,6 @@ +# key: dm +# name: Display Math +# condition: (and (not (texmathp)) (quote auto)) +# group: math +# -- +\[ `(save-excursion (previous-line)(make-string (current-indentation) ?\s))`$0 \] diff --git a/snippets/latex-mode/Exists b/snippets/latex-mode/Exists new file mode 100644 index 0000000..2f36820 --- /dev/null +++ b/snippets/latex-mode/Exists @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: Exists +# key: EE +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\exists \ No newline at end of file diff --git a/snippets/latex-mode/Fraction auto b/snippets/latex-mode/Fraction auto new file mode 100644 index 0000000..09fcc05 --- /dev/null +++ b/snippets/latex-mode/Fraction auto @@ -0,0 +1,16 @@ +# key: // +# name: Fraction auto +# type: command +# condition: (and (texmathp) (quote auto)) +# group: math +# -- +(let ((numerator t)) + (condition-case nil + (save-excursion + (backward-sexp) + (kill-sexp) + (delete-char 1)) + (error (setq numerator 'nil))) + (insert "\\frac{" (if numerator (current-kill 0) "") + "}{}") + (backward-char (if numerator 1 3))) \ No newline at end of file diff --git a/snippets/latex-mode/Fraction slash b/snippets/latex-mode/Fraction slash new file mode 100644 index 0000000..e6c3d46 --- /dev/null +++ b/snippets/latex-mode/Fraction slash @@ -0,0 +1,17 @@ +# -*- mode: snippet -*- +# name: Fraction slash +# key: / +# type: command +# condition: (texmathp) +# group: math +# -- +(let ((numerator t)) + (condition-case nil + (save-excursion + (backward-sexp) + (kill-sexp) + (delete-char 1)) + (error (setq numerator 'nil))) + (insert "\\frac{" (if numerator (current-kill 0) "") + "}{}") + (backward-char (if numerator 1 3))) \ No newline at end of file diff --git a/snippets/latex-mode/Inline Math b/snippets/latex-mode/Inline Math new file mode 100644 index 0000000..5b201d5 --- /dev/null +++ b/snippets/latex-mode/Inline Math @@ -0,0 +1,6 @@ +# key: mk +# name: Inline Math +# condition: (and (not (texmathp)) (quote auto)) +# group: math +# -- +\\( $0 \\) \ No newline at end of file diff --git a/snippets/latex-mode/Tikz Plot b/snippets/latex-mode/Tikz Plot new file mode 100644 index 0000000..6f903be --- /dev/null +++ b/snippets/latex-mode/Tikz Plot @@ -0,0 +1,19 @@ +# -*- mode: snippet -*- +# name: Tikz Plot +# key: tikzplot +# group: environments +# -- +\begin{figure}[$1] + \centering + \begin{tikzpicture} + \begin{axis}[ + xmin= ${2:-10}, xmax= ${3:10}, + ymin= ${4:-10}, ymax = ${5:10}, + axis lines = middle, + ] + \addplot[domain=$2:$3, samples=${6:100}]{$7}; + \end{axis} + \end{tikzpicture} + \caption{$8} + \label{${9:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} +\end{figure} diff --git a/snippets/latex-mode/To the power b/snippets/latex-mode/To the power new file mode 100644 index 0000000..2486686 --- /dev/null +++ b/snippets/latex-mode/To the power @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: To the power +# key: pw +# condition: (and (texmathp) 'auto) +# group: math +# -- +^{$0} \ No newline at end of file diff --git a/snippets/latex-mode/^2 b/snippets/latex-mode/^2 new file mode 100644 index 0000000..9e8d0fb --- /dev/null +++ b/snippets/latex-mode/^2 @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: ^2 +# key: sr +# condition: (and (texmathp) 'auto) +# group: math +# -- +^2$0 \ No newline at end of file diff --git a/snippets/latex-mode/^3 b/snippets/latex-mode/^3 new file mode 100644 index 0000000..c45c07b --- /dev/null +++ b/snippets/latex-mode/^3 @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: ^3 +# key: cb +# condition: (and (texmathp) 'auto) +# group: math +# -- +^3$0 \ No newline at end of file diff --git a/snippets/latex-mode/abstract.yasnippet b/snippets/latex-mode/abstract.yasnippet new file mode 100644 index 0000000..04badc7 --- /dev/null +++ b/snippets/latex-mode/abstract.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key : abstract +# group: sections +# name : \abstract +# -- +\begin{abstract} +$0 +\end{abstract} \ No newline at end of file diff --git a/snippets/latex-mode/adjoint b/snippets/latex-mode/adjoint new file mode 100644 index 0000000..2b8f2e2 --- /dev/null +++ b/snippets/latex-mode/adjoint @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: adjoint +# key: adj +# group: math +# condition: (and (texmathp) 'auto) +# -- +`(delete-backward-char 1)`^{\\dagger}$0 \ No newline at end of file diff --git a/snippets/latex-mode/align.yasnippet b/snippets/latex-mode/align.yasnippet new file mode 100644 index 0000000..4fd7beb --- /dev/null +++ b/snippets/latex-mode/align.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor : Rasmus Borgsmidt +# key : align +# group: environments +# name : \begin{align} ... \end{align} +# -- +\begin{align} + $0 +\end{align} \ No newline at end of file diff --git a/snippets/latex-mode/alignstar.yasnippet b/snippets/latex-mode/alignstar.yasnippet new file mode 100644 index 0000000..538a2dd --- /dev/null +++ b/snippets/latex-mode/alignstar.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor : Rasmus Borgsmidt +# key : align* +# group: environments +# name : \begin{align*} ... \end{align*} +# -- +\begin{align*} + $0 +\end{align*} \ No newline at end of file diff --git a/snippets/latex-mode/arccos b/snippets/latex-mode/arccos new file mode 100644 index 0000000..47d5483 --- /dev/null +++ b/snippets/latex-mode/arccos @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: arccos +# key: arccos +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\arccos \ No newline at end of file diff --git a/snippets/latex-mode/arccot b/snippets/latex-mode/arccot new file mode 100644 index 0000000..e3c6285 --- /dev/null +++ b/snippets/latex-mode/arccot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: arccot +# key: arccot +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\arccot \ No newline at end of file diff --git a/snippets/latex-mode/arccsc b/snippets/latex-mode/arccsc new file mode 100644 index 0000000..49d223d --- /dev/null +++ b/snippets/latex-mode/arccsc @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: arccsc +# key: arccsc +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\arccsc \ No newline at end of file diff --git a/snippets/latex-mode/arcsec b/snippets/latex-mode/arcsec new file mode 100644 index 0000000..b530606 --- /dev/null +++ b/snippets/latex-mode/arcsec @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: arcsec +# key: arcsec +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\arcsec \ No newline at end of file diff --git a/snippets/latex-mode/arcsin b/snippets/latex-mode/arcsin new file mode 100644 index 0000000..ece90be --- /dev/null +++ b/snippets/latex-mode/arcsin @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: arcsin +# key: arcsin +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\arcsin \ No newline at end of file diff --git a/snippets/latex-mode/arctan b/snippets/latex-mode/arctan new file mode 100644 index 0000000..4b823f4 --- /dev/null +++ b/snippets/latex-mode/arctan @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: arctan +# key: arctan +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\arctan \ No newline at end of file diff --git a/snippets/latex-mode/array.yasnippet b/snippets/latex-mode/array.yasnippet new file mode 100644 index 0000000..aa67ae9 --- /dev/null +++ b/snippets/latex-mode/array.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor : Peter Urbak +# key : arr +# group: environments +# name : \begin{array} ... \end{array} +# -- +\begin{array}{$1} + $0 +\end{array} diff --git a/snippets/latex-mode/article.yasnippet b/snippets/latex-mode/article.yasnippet new file mode 100644 index 0000000..a9e5203 --- /dev/null +++ b/snippets/latex-mode/article.yasnippet @@ -0,0 +1,28 @@ +# -*- mode: snippet -*- +# contributor: Mads D. Kristensen +# contributor : Song Qiang +# key: article +# group: skeleton +# name: \documentclass{article} ... +# -- +\documentclass[11pt]{article} + +\usepackage{graphicx,amsmath,amssymb,subfigure,url,xspace} +\newcommand{\eg}{e.g.,\xspace} +\newcommand{\bigeg}{E.g.,\xspace} +\newcommand{\etal}{\textit{et~al.\xspace}} +\newcommand{\etc}{etc.\@\xspace} +\newcommand{\ie}{i.e.,\xspace} +\newcommand{\bigie}{I.e.,\xspace} + +\title{${1:title}} +\author{${2:Author Name}} + +\begin{document} +\maketitle + + +\bibliographystyle{${3:plain}} +\bibliography{${4:literature.bib}} + +\end{document} diff --git a/snippets/latex-mode/bar b/snippets/latex-mode/bar new file mode 100644 index 0000000..eff23e6 --- /dev/null +++ b/snippets/latex-mode/bar @@ -0,0 +1,15 @@ +# -*- mode: snippet -*- +# name: bar +# key: bar +# type: command +# condition: (and (texmathp) 'auto) +# group: math +# -- +(let ((argument t)) + (condition-case nil + (progn + (backward-sexp) + (kill-sexp) + (delete-char 1)) + (error (setq argument 'nil))) + (insert "\\bar{" (if argument (current-kill 0) "") "}")) \ No newline at end of file diff --git a/snippets/latex-mode/basict b/snippets/latex-mode/basict new file mode 100644 index 0000000..9ac0047 --- /dev/null +++ b/snippets/latex-mode/basict @@ -0,0 +1,17 @@ +# key: basict +# group: skeleton +# name: \documentclass{article} ... +# -- +\documentclass[11pt]{article} + +\usepackage{graphicx,amsmath,amssymb,subfigure,url,xspace} + +\title{${1:title}} +\author{${2:Author Name}} + +\begin{document} +\maketitle + +$0 + +\end{document} diff --git a/snippets/latex-mode/bbm1 b/snippets/latex-mode/bbm1 new file mode 100644 index 0000000..20ec88e --- /dev/null +++ b/snippets/latex-mode/bbm1 @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: bbm1 +# key: 11 +# -- +\mathbbm{1} \ No newline at end of file diff --git a/snippets/latex-mode/beamer.yasnippet b/snippets/latex-mode/beamer.yasnippet new file mode 100644 index 0000000..4c4c7c3 --- /dev/null +++ b/snippets/latex-mode/beamer.yasnippet @@ -0,0 +1,37 @@ +# -*- mode: snippet -*- +# contributor: Claudio Marforio +# key: beamer +# group: skeleton +# name: \documentclass{beamer} ... +# -- +\documentclass[xcolor=dvipsnames]{beamer} + +\usepackage{graphicx,subfigure,url} + +% example themes +\usetheme{Frankfurt} +\usecolortheme{seahorse} +\usecolortheme{rose} + +% put page numbers +% \setbeamertemplate{footline}[frame number]{} +% remove navigation symbols +% \setbeamertemplate{navigation symbols}{} + +\title{${1:Presentation Title}} +\author{${2:Author Name}} + +\begin{document} + +\frame[plain]{\titlepage} + +\begin{frame}[plain]{Outline} + \tableofcontents +\end{frame} + +\section{${3:Example Section}} +\begin{frame}{${4:Frame Title}} + +\end{frame} + +\end{document} diff --git a/snippets/latex-mode/begin.yasnippet b/snippets/latex-mode/begin.yasnippet new file mode 100644 index 0000000..e18b643 --- /dev/null +++ b/snippets/latex-mode/begin.yasnippet @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# contributor: Mads D. Kristensen +# contributor : Bjorn Reese +# key: begin +# group: environments +# name: \begin{environment} ... \end{environment} +# -- +\begin{${1:$$(yas/choose-value (mapcar 'car (LaTeX-environment-list)))}} +$0 +\end{$1} \ No newline at end of file diff --git a/snippets/latex-mode/bib.yasnippet b/snippets/latex-mode/bib.yasnippet new file mode 100644 index 0000000..9dc6ad7 --- /dev/null +++ b/snippets/latex-mode/bib.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# contributor: Mads D. Kristensen +# key: bib +# group: misc +# name: \bibliography +# -- +\bibliographystyle{plain} +\bibliography{$1}$0 \ No newline at end of file diff --git a/snippets/latex-mode/big.yasnippet b/snippets/latex-mode/big.yasnippet new file mode 100644 index 0000000..ff59479 --- /dev/null +++ b/snippets/latex-mode/big.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: Song Qiang +# key: big +# group: math +# name: \bigl( ... \bigr) +# -- +\\${1:$$(yas/choose-value '("big" "Big" "bigg" "Bigg"))}l( $0 \\$1r) \ No newline at end of file diff --git a/snippets/latex-mode/bigop.yasnippet b/snippets/latex-mode/bigop.yasnippet new file mode 100644 index 0000000..7aa214f --- /dev/null +++ b/snippets/latex-mode/bigop.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: François Garillot +# key: bigop +# group: math +# name: \bigop_{n}^{} +# -- +\\big${1:$$(yas/choose-value '("oplus" "otimes" "odot" "cup" "cap" "uplus" "sqcup" "vee" "wedge"))}_{$2}^{$3}$0 diff --git a/snippets/latex-mode/binom.yasnippet b/snippets/latex-mode/binom.yasnippet new file mode 100644 index 0000000..98d663d --- /dev/null +++ b/snippets/latex-mode/binom.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: Song Qiang +# key: binom +# group: math +# name: \binom{n}{k} +# -- +\binom{${1:n}}{${2:k}} \ No newline at end of file diff --git a/snippets/latex-mode/block.yasnippet b/snippets/latex-mode/block.yasnippet new file mode 100644 index 0000000..39f3cd0 --- /dev/null +++ b/snippets/latex-mode/block.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor: Claudio Marforio +# key: block +# group: environments +# name : \begin{*block} ... \end{*block} +# -- +\begin{${1:$$(yas/choose-value '("block" "exampleblock" "alertblock"))}}{${2:Block Title}} + +\end{$1} diff --git a/snippets/latex-mode/bmatrix (2 x 2) b/snippets/latex-mode/bmatrix (2 x 2) new file mode 100644 index 0000000..a82ffd1 --- /dev/null +++ b/snippets/latex-mode/bmatrix (2 x 2) @@ -0,0 +1,8 @@ +# key: mat2 +# name: bmatrix (2 x 2) +# group: math +# -- +\\begin{bmatrix} +${1:A} & ${2:$1} \\\\ +${3:$1} & ${4:$1} + \\end{bmatrix} \ No newline at end of file diff --git a/snippets/latex-mode/bmatrix (3 x 3) b/snippets/latex-mode/bmatrix (3 x 3) new file mode 100644 index 0000000..2dce9f5 --- /dev/null +++ b/snippets/latex-mode/bmatrix (3 x 3) @@ -0,0 +1,8 @@ +# key: mat3 +# name: bmatrix (3 x 3) +# -- +\\begin{bmatrix} +${1:A} & ${2:$1} & ${3:$1} \\\\ +${4:$1} & ${5:$1} & ${6:$1} \\\\ +${7:$1} & ${8:$1} & ${9:$1} +\\end{bmatrix} \ No newline at end of file diff --git a/snippets/latex-mode/bold.yasnippet b/snippets/latex-mode/bold.yasnippet new file mode 100644 index 0000000..c717a7b --- /dev/null +++ b/snippets/latex-mode/bold.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: Márcio M. Ribeiro +# key: bf +# group: font +# name: {\bf ... } +# -- +{\bf $1}$0 \ No newline at end of file diff --git a/snippets/latex-mode/case.yasnippet b/snippets/latex-mode/case.yasnippet new file mode 100644 index 0000000..70a67d0 --- /dev/null +++ b/snippets/latex-mode/case.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor: Mads D. Kristensen +# key: case +# group: math +# name: \begin{cases} ... \end{cases} +# -- +\begin{cases} +$0 \\\\ +\end{cases} diff --git a/snippets/latex-mode/cases b/snippets/latex-mode/cases new file mode 100644 index 0000000..58e9201 --- /dev/null +++ b/snippets/latex-mode/cases @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: cases +# key: case +# condition: (texmathp) +# group: math +# -- +\\begin{cases} + $1 +\\end{cases}$0 \ No newline at end of file diff --git a/snippets/latex-mode/ceiling function b/snippets/latex-mode/ceiling function new file mode 100644 index 0000000..6049bb9 --- /dev/null +++ b/snippets/latex-mode/ceiling function @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: ceiling function +# key: ceil +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\left\\lceil $1 \\right\\rceil $0 \ No newline at end of file diff --git a/snippets/latex-mode/cha.yasnippet b/snippets/latex-mode/cha.yasnippet new file mode 100644 index 0000000..898e21d --- /dev/null +++ b/snippets/latex-mode/cha.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key : cha +# group: sections +# name : \chapter +# -- +\chapter{${1:name}} +\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} +$0 \ No newline at end of file diff --git a/snippets/latex-mode/chastar.yasnippet b/snippets/latex-mode/chastar.yasnippet new file mode 100644 index 0000000..d9a8bb9 --- /dev/null +++ b/snippets/latex-mode/chastar.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key : cha* +# group: sections +# name : \chapter* +# -- +\chapter*{${1:name}} +$0 \ No newline at end of file diff --git a/snippets/latex-mode/cite.yasnippet b/snippets/latex-mode/cite.yasnippet new file mode 100644 index 0000000..c356dc1 --- /dev/null +++ b/snippets/latex-mode/cite.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor : Marcio M. Ribeiro +# key: cite +# group: references +# name : \cite +# -- +`(unless yas-modified-p (setq this-command 'citar-insert-citation) (call-interactively 'citar-insert-citation))` \ No newline at end of file diff --git a/snippets/latex-mode/code b/snippets/latex-mode/code new file mode 100644 index 0000000..24badbf --- /dev/null +++ b/snippets/latex-mode/code @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: code +# key: code +# -- +\begin{lstlisting}${1:[language=${2:Matlab}]} +$0 +\end{lstlisting} \ No newline at end of file diff --git a/snippets/latex-mode/column vector b/snippets/latex-mode/column vector new file mode 100644 index 0000000..ee5650e --- /dev/null +++ b/snippets/latex-mode/column vector @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: column vector +# key: cvec +# condition: 'auto +# group: math +# -- +\\begin{pmatrix} ${1:x}_{${2:1}}\\\\ ${3:\\vdots}\\\\ $1_{${4:n}} \\end{pmatrix} \ No newline at end of file diff --git a/snippets/latex-mode/column-separator b/snippets/latex-mode/column-separator new file mode 100644 index 0000000..24f4925 --- /dev/null +++ b/snippets/latex-mode/column-separator @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: column-separator +# key: ,, +# condition: (and (texmathp) 'auto) +# group: math +# -- +& $0 \ No newline at end of file diff --git a/snippets/latex-mode/columns b/snippets/latex-mode/columns new file mode 100644 index 0000000..80388f1 --- /dev/null +++ b/snippets/latex-mode/columns @@ -0,0 +1,13 @@ +# -*- mode: snippet -*- +# name: columns +# key: cols +# -- +\begin{columns} + \begin{column}{.${1:5}\textwidth} + $0 + \end{column} + + \begin{column}{.${2:5}\textwidth} + + \end{column} +\end{columns} \ No newline at end of file diff --git a/snippets/latex-mode/complex conjugate b/snippets/latex-mode/complex conjugate new file mode 100644 index 0000000..a873f81 --- /dev/null +++ b/snippets/latex-mode/complex conjugate @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: complex conjugate +# key: cj +# condition: (and (texmathp) 'auto) +# group: math +# -- +^{\\star}$0 \ No newline at end of file diff --git a/snippets/latex-mode/coprod.yasnippet b/snippets/latex-mode/coprod.yasnippet new file mode 100644 index 0000000..770bbaa --- /dev/null +++ b/snippets/latex-mode/coprod.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: François Garillot +# key: coprod +# group: math +# name: \coprod_{n}^{} +# -- +\coprod_{$1}^{$2}$0 diff --git a/snippets/latex-mode/cos b/snippets/latex-mode/cos new file mode 100644 index 0000000..a6c93c8 --- /dev/null +++ b/snippets/latex-mode/cos @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: cos +# key: cos +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\cos \ No newline at end of file diff --git a/snippets/latex-mode/cot b/snippets/latex-mode/cot new file mode 100644 index 0000000..a93205e --- /dev/null +++ b/snippets/latex-mode/cot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: cot +# key: cot +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\cot \ No newline at end of file diff --git a/snippets/latex-mode/csc b/snippets/latex-mode/csc new file mode 100644 index 0000000..f557675 --- /dev/null +++ b/snippets/latex-mode/csc @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: csc +# key: csc +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\csc \ No newline at end of file diff --git a/snippets/latex-mode/d-by-dt b/snippets/latex-mode/d-by-dt new file mode 100644 index 0000000..4582348 --- /dev/null +++ b/snippets/latex-mode/d-by-dt @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: d-by-dt +# key: ddt +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\frac{\\mathrm{d} $1}{\\mathrm{d} ${2:t}}$0 \ No newline at end of file diff --git a/snippets/latex-mode/ddots b/snippets/latex-mode/ddots new file mode 100644 index 0000000..a89bbc2 --- /dev/null +++ b/snippets/latex-mode/ddots @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: ddots +# key: /, +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\ddots \ No newline at end of file diff --git a/snippets/latex-mode/definite integral b/snippets/latex-mode/definite integral new file mode 100644 index 0000000..34f48dd --- /dev/null +++ b/snippets/latex-mode/definite integral @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: definite integral +# key: dint +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\int_{${1:-\\infty}}^{${2:\\infty}}$0 \ No newline at end of file diff --git a/snippets/latex-mode/desc.yasnippet b/snippets/latex-mode/desc.yasnippet new file mode 100644 index 0000000..4b77ad2 --- /dev/null +++ b/snippets/latex-mode/desc.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key : desc +# group: environments +# name : \begin{description} ... \end{description} +# -- +\begin{description} +\item[${1:label}] $0 +\end{description} diff --git a/snippets/latex-mode/doc.yasnippet b/snippets/latex-mode/doc.yasnippet new file mode 100644 index 0000000..6203573 --- /dev/null +++ b/snippets/latex-mode/doc.yasnippet @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# contributor: Mads D. Kristensen +# key: doc +# name: \documentclass +# -- +\documentclass[$2]{${1:$$(yas/choose-value '("article" "report" "book" "letter"))}} + +\begin{document} +$0 +\end{document} diff --git a/snippets/latex-mode/dots b/snippets/latex-mode/dots new file mode 100644 index 0000000..69fb1f5 --- /dev/null +++ b/snippets/latex-mode/dots @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: dots +# key: ... +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\dots$0 \ No newline at end of file diff --git a/snippets/latex-mode/em.yasnippet b/snippets/latex-mode/em.yasnippet new file mode 100644 index 0000000..84fe8f0 --- /dev/null +++ b/snippets/latex-mode/em.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: Márcio M. Ribeiro +# key: em +# group: font +# name: {\em ...} +# -- +{\em $1}$0 \ No newline at end of file diff --git a/snippets/latex-mode/enum.yasnippet b/snippets/latex-mode/enum.yasnippet new file mode 100644 index 0000000..9d7e398 --- /dev/null +++ b/snippets/latex-mode/enum.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key: enum +# group: environments +# name : \begin{enumerate} ... \end{enumerate} +# -- +\begin{enumerate} +\item $0 +\end{enumerate} diff --git a/snippets/latex-mode/eq.yasnippet b/snippets/latex-mode/eq.yasnippet new file mode 100644 index 0000000..64be33f --- /dev/null +++ b/snippets/latex-mode/eq.yasnippet @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# contributor: Mads D. Kristensen +# key: eq +# group: math +# name: \begin{equation} ... \end{equation} +# -- +\begin{equation} +\label{${1:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} +$0 +\end{equation} diff --git a/snippets/latex-mode/eqs.yasnippet b/snippets/latex-mode/eqs.yasnippet new file mode 100644 index 0000000..1eee28c --- /dev/null +++ b/snippets/latex-mode/eqs.yasnippet @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# contributor: Mads D. Kristensen +# key: eqs +# group: math +# name: \begin{align} ... \end{align} +# -- +\begin{${1:$$(yas/choose-value '("align" "align*" "multline" "gather" "subequations"))}} +\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} +$0 +\end{$1} diff --git a/snippets/latex-mode/equiv b/snippets/latex-mode/equiv new file mode 100644 index 0000000..b76e86a --- /dev/null +++ b/snippets/latex-mode/equiv @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: equiv +# key: eqv +# condition: (and (texmathp) 'auto) +# -- +\\equiv$0 \ No newline at end of file diff --git a/snippets/latex-mode/exp b/snippets/latex-mode/exp new file mode 100644 index 0000000..a6f4680 --- /dev/null +++ b/snippets/latex-mode/exp @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: exp +# key: exp +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\exp \ No newline at end of file diff --git a/snippets/latex-mode/fig.yasnippet b/snippets/latex-mode/fig.yasnippet new file mode 100644 index 0000000..2152c36 --- /dev/null +++ b/snippets/latex-mode/fig.yasnippet @@ -0,0 +1,12 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key : fig +# group: environments +# name : \begin{figure} ... \end{figure} +# -- +\begin{figure}[htbp] + \centering + $0 + \caption{${1:caption}} + \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} +\end{figure} diff --git a/snippets/latex-mode/floor function b/snippets/latex-mode/floor function new file mode 100644 index 0000000..3ba0137 --- /dev/null +++ b/snippets/latex-mode/floor function @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: floor function +# key: floor +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\left\\lfloor $1 \\right\\rfloor $0 \ No newline at end of file diff --git a/snippets/latex-mode/forall b/snippets/latex-mode/forall new file mode 100644 index 0000000..f0624b6 --- /dev/null +++ b/snippets/latex-mode/forall @@ -0,0 +1,6 @@ +# key: VV +# name: forall +# condition: (and (texmathp) (quote auto)) +# group: math +# -- +\\forall$0 \ No newline at end of file diff --git a/snippets/latex-mode/frac.yasnippet b/snippets/latex-mode/frac.yasnippet new file mode 100644 index 0000000..12fa023 --- /dev/null +++ b/snippets/latex-mode/frac.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: Song Qiang +# key: frac +# group: math +# name: \frac{numerator}{denominator} +# -- +\frac{${1:numerator}}{${2:denominator}}$0 \ No newline at end of file diff --git a/snippets/latex-mode/frame.yasnippet b/snippets/latex-mode/frame.yasnippet new file mode 100644 index 0000000..966e1f2 --- /dev/null +++ b/snippets/latex-mode/frame.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor: Claudio Marforio +# key: frame +# group: environments +# name : \begin{frame} ... \end{frame} +# -- +\begin{frame}{${1:Frame Title$(capitalize yas-text)}} +$0 +\end{frame} diff --git a/snippets/latex-mode/gls.yasnippet b/snippets/latex-mode/gls.yasnippet new file mode 100644 index 0000000..b944042 --- /dev/null +++ b/snippets/latex-mode/gls.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# contributor : Peter Urbak +# key : newgls +# group: misc +# name : \newglossaryentry{...}{...} +# -- +\newglossaryentry{$1}{name={$1}, + description={$2.}} diff --git a/snippets/latex-mode/graphics.yasnippet b/snippets/latex-mode/graphics.yasnippet new file mode 100644 index 0000000..c3add51 --- /dev/null +++ b/snippets/latex-mode/graphics.yasnippet @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key : graphics +# name : \includegraphics +# -- +\includegraphics[width=${1:\linewidth}]{${2:file}} \ No newline at end of file diff --git a/snippets/latex-mode/greater greater b/snippets/latex-mode/greater greater new file mode 100644 index 0000000..98c9eaa --- /dev/null +++ b/snippets/latex-mode/greater greater @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: greater greater +# key: >> +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\gg \ No newline at end of file diff --git a/snippets/latex-mode/greater or equal b/snippets/latex-mode/greater or equal new file mode 100644 index 0000000..ac8e050 --- /dev/null +++ b/snippets/latex-mode/greater or equal @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: greater or equal +# key: geq +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\ge \ No newline at end of file diff --git a/snippets/latex-mode/hat b/snippets/latex-mode/hat new file mode 100644 index 0000000..3ce0d2d --- /dev/null +++ b/snippets/latex-mode/hat @@ -0,0 +1,15 @@ +# -*- mode: snippet -*- +# name: hat +# key: hat +# type: command +# condition: (and (texmathp) 'auto) +# group: math +# -- +(let ((argument t)) + (condition-case nil + (progn + (backward-sexp) + (kill-sexp) + (delete-char 1)) + (error (setq argument 'nil))) + (insert "\\hat{" (if argument (current-kill 0) "") "}")) \ No newline at end of file diff --git a/snippets/latex-mode/href.yasnippet b/snippets/latex-mode/href.yasnippet new file mode 100644 index 0000000..78ce877 --- /dev/null +++ b/snippets/latex-mode/href.yasnippet @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# key: href +# group: environments +# name: \href{url}{text} +# -- +\href{${1:url}}{${2:text}}$0 \ No newline at end of file diff --git a/snippets/latex-mode/if and only if b/snippets/latex-mode/if and only if new file mode 100644 index 0000000..79e9eee --- /dev/null +++ b/snippets/latex-mode/if and only if @@ -0,0 +1,6 @@ +# key: iff +# name: if and only if +# condition: (and (texmathp) (quote auto)) +# group: math +# -- +\iff \ No newline at end of file diff --git a/snippets/latex-mode/implied by b/snippets/latex-mode/implied by new file mode 100644 index 0000000..f5f91bf --- /dev/null +++ b/snippets/latex-mode/implied by @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: implied by +# key: <= +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\impliedby $0 \ No newline at end of file diff --git a/snippets/latex-mode/implies b/snippets/latex-mode/implies new file mode 100644 index 0000000..e8a2747 --- /dev/null +++ b/snippets/latex-mode/implies @@ -0,0 +1,6 @@ +# key: => +# name: implies +# condition: (and (texmathp) (quote auto)) +# group: math +# -- +\implies$0 \ No newline at end of file diff --git a/snippets/latex-mode/in b/snippets/latex-mode/in new file mode 100644 index 0000000..4b9a7ef --- /dev/null +++ b/snippets/latex-mode/in @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: in +# key: inn +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\in \ No newline at end of file diff --git a/snippets/latex-mode/includegraphics b/snippets/latex-mode/includegraphics new file mode 100644 index 0000000..d46c9a4 --- /dev/null +++ b/snippets/latex-mode/includegraphics @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: includegraphics +# key: ig +# -- +\includegraphics${1:[$2]}{$0} \ No newline at end of file diff --git a/snippets/latex-mode/infimum b/snippets/latex-mode/infimum new file mode 100644 index 0000000..4052a4b --- /dev/null +++ b/snippets/latex-mode/infimum @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: infimum +# key: inf +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\inf_{$1 \\in $2} $0 \ No newline at end of file diff --git a/snippets/latex-mode/int.yasnippet b/snippets/latex-mode/int.yasnippet new file mode 100644 index 0000000..d38a38e --- /dev/null +++ b/snippets/latex-mode/int.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# contributor: Song Qiang +# key: integ +# group: math +# condition: (and (texmathp) 'auto) +# name: Indefinite integral (all) +# -- +\\${1:$$(yas/choose-value '("int" "oint" "iint" "iiint" "iiiint" "idotsint"))}$0 \ No newline at end of file diff --git a/snippets/latex-mode/inverse b/snippets/latex-mode/inverse new file mode 100644 index 0000000..3bc0b58 --- /dev/null +++ b/snippets/latex-mode/inverse @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: inverse +# key: inv +# condition: (and (texmathp) 'auto) +# group: math +# -- +^{\text{-}1} \ No newline at end of file diff --git a/snippets/latex-mode/it.yasnippet b/snippets/latex-mode/it.yasnippet new file mode 100644 index 0000000..d9052bf --- /dev/null +++ b/snippets/latex-mode/it.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: Mads D. Kristensen +# key: it +# group: environments +# name: \item +# -- +\item $0 \ No newline at end of file diff --git a/snippets/latex-mode/itd.yasnippet b/snippets/latex-mode/itd.yasnippet new file mode 100644 index 0000000..94d9358 --- /dev/null +++ b/snippets/latex-mode/itd.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: Rasmus Borgsmidt +# key: itd +# group: environments +# name: \item[] (description) +# -- +\item[${1:label}] $0 \ No newline at end of file diff --git a/snippets/latex-mode/item.yasnippet b/snippets/latex-mode/item.yasnippet new file mode 100644 index 0000000..14fb2d0 --- /dev/null +++ b/snippets/latex-mode/item.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key : item +# group: environments +# name : \begin{itemize} ... \end{itemize} +# -- +\begin{itemize} +\item $0 +\end{itemize} diff --git a/snippets/latex-mode/label.yasnippet b/snippets/latex-mode/label.yasnippet new file mode 100644 index 0000000..9bcc82b --- /dev/null +++ b/snippets/latex-mode/label.yasnippet @@ -0,0 +1,7 @@ + -*- mode: snippet -*- +# contributor : Márcio M. Ribeiro +# key: lab +# group: references +# name : \label +# -- +\label{${1:label$(unless yas/modified-p (reftex-label nil 'dont-insert))}}$0 diff --git a/snippets/latex-mode/leftrightarrow b/snippets/latex-mode/leftrightarrow new file mode 100644 index 0000000..6048c31 --- /dev/null +++ b/snippets/latex-mode/leftrightarrow @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: leftrightarrow +# key: <-> +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\leftrightarrow diff --git a/snippets/latex-mode/less or equal b/snippets/latex-mode/less or equal new file mode 100644 index 0000000..ba5dba3 --- /dev/null +++ b/snippets/latex-mode/less or equal @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: less or equal +# key: leq +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\le$0 \ No newline at end of file diff --git a/snippets/latex-mode/lesser lesser b/snippets/latex-mode/lesser lesser new file mode 100644 index 0000000..aaa4f0f --- /dev/null +++ b/snippets/latex-mode/lesser lesser @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: lesser lesser +# key: << +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\ll \ No newline at end of file diff --git a/snippets/latex-mode/letter.yasnippet b/snippets/latex-mode/letter.yasnippet new file mode 100644 index 0000000..258cf3d --- /dev/null +++ b/snippets/latex-mode/letter.yasnippet @@ -0,0 +1,27 @@ +# -*- mode: snippet -*- +# contributor: Mads D. Kristensen +# contributor : Song Qiang +# key: letter +# group: skeleton +# name: \documentclass{letter} ... +# -- +\documentclass{letter} +\signature{${1:Foo Bar}} +\address{${2:Address line 1 \\\\ +Address line 2 \\\\ +Address line 3}} +\begin{document} + +\begin{letter} +{${3:Recipient's address}} + +\opening{Dear ${4:Sir}:} + +$0 + +\closing{Yours Sincerely,} + +\end{letter} + +\end{document} + diff --git a/snippets/latex-mode/lim.yasnippet b/snippets/latex-mode/lim.yasnippet new file mode 100644 index 0000000..e752dae --- /dev/null +++ b/snippets/latex-mode/lim.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: François Garillot +# key: limit +# group: math +# name: \lim_{n} +# -- +\lim_{$1}$0 diff --git a/snippets/latex-mode/limit b/snippets/latex-mode/limit new file mode 100644 index 0000000..9d10f73 --- /dev/null +++ b/snippets/latex-mode/limit @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: limit +# key: lim +# conditon: (texmathp) +# group: math +# -- +\\lim_{${1:n} \\to ${2:\\infty}} $0 \ No newline at end of file diff --git a/snippets/latex-mode/limsup b/snippets/latex-mode/limsup new file mode 100644 index 0000000..be662dd --- /dev/null +++ b/snippets/latex-mode/limsup @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: limsup +# key: limsup +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\limsup_{${1:n} \\to ${2:\\infty}} $0 \ No newline at end of file diff --git a/snippets/latex-mode/listing b/snippets/latex-mode/listing new file mode 100644 index 0000000..3c95b17 --- /dev/null +++ b/snippets/latex-mode/listing @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: listing +# key: lst +# -- +\begin{lstlisting}[float,label=lst:${1:label},caption=nextHopInfo: ${2:caption}] +$0 +\end{lstlisting} \ No newline at end of file diff --git a/snippets/latex-mode/ln b/snippets/latex-mode/ln new file mode 100644 index 0000000..6473e4f --- /dev/null +++ b/snippets/latex-mode/ln @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: ln +# key: ln +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\ln \ No newline at end of file diff --git a/snippets/latex-mode/log b/snippets/latex-mode/log new file mode 100644 index 0000000..09e3cd8 --- /dev/null +++ b/snippets/latex-mode/log @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: log +# key: log +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\log \ No newline at end of file diff --git a/snippets/latex-mode/math.yasnippet b/snippets/latex-mode/math.yasnippet new file mode 100644 index 0000000..cfbdd04 --- /dev/null +++ b/snippets/latex-mode/math.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor: Song Qiang +# key: math +# group: math +# name: displaymath \[ ... \] +# -- +\[ +$1 +\] diff --git a/snippets/latex-mode/matrix.yasnippet b/snippets/latex-mode/matrix.yasnippet new file mode 100644 index 0000000..00f9184 --- /dev/null +++ b/snippets/latex-mode/matrix.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: Song Qiang +# key: matrix +# group: math +# name: \begin{matrix} ... \end{} +# -- +\begin{${1:$$(yas/choose-value '("pmatrix" "bmatrix" "Bmatrix" "vmatrix" "Vmatrix" "smallmatrix"))}} $0 \end{$1} \ No newline at end of file diff --git a/snippets/latex-mode/minipage.yasnippet b/snippets/latex-mode/minipage.yasnippet new file mode 100644 index 0000000..447b31e --- /dev/null +++ b/snippets/latex-mode/minipage.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor: Mads D. Kristensen +# key: minipage +# group: environments +# name: \begin{minipage}[position][width] ... \end{minipage} +# -- +\begin{minipage}[${1:htbp}]{${2:1.0}${3:\linewidth}} + $0 +\end{minipage} \ No newline at end of file diff --git a/snippets/latex-mode/newline b/snippets/latex-mode/newline new file mode 100644 index 0000000..905e809 --- /dev/null +++ b/snippets/latex-mode/newline @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: newline +# key: \\ +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\\\ +`(save-excursion (previous-line)(make-string (current-indentation) ?\s))`$0 \ No newline at end of file diff --git a/snippets/latex-mode/norm b/snippets/latex-mode/norm new file mode 100644 index 0000000..25d46db --- /dev/null +++ b/snippets/latex-mode/norm @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: norm +# key: norm +# condition: (and (texmathp) 'auto) +# group: math +# -- +\left\|$1\right\|$0 \ No newline at end of file diff --git a/snippets/latex-mode/not equal b/snippets/latex-mode/not equal new file mode 100644 index 0000000..c77d4ac --- /dev/null +++ b/snippets/latex-mode/not equal @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: not equal +# key: neq +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\ne \ No newline at end of file diff --git a/snippets/latex-mode/not in b/snippets/latex-mode/not in new file mode 100644 index 0000000..53d3a72 --- /dev/null +++ b/snippets/latex-mode/not in @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: not in +# key: notin +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\not\\in \ No newline at end of file diff --git a/snippets/latex-mode/notexists b/snippets/latex-mode/notexists new file mode 100644 index 0000000..5a929ca --- /dev/null +++ b/snippets/latex-mode/notexists @@ -0,0 +1,6 @@ +# key: nEE +# name: notexists +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\nexists \ No newline at end of file diff --git a/snippets/latex-mode/oplus b/snippets/latex-mode/oplus new file mode 100644 index 0000000..8fc9bab --- /dev/null +++ b/snippets/latex-mode/oplus @@ -0,0 +1,6 @@ +# key: o+ +# name: oplus +# condition: (and (texmathp) 'auto) +# group: math +# -- +\oplus \ No newline at end of file diff --git a/snippets/latex-mode/otimes b/snippets/latex-mode/otimes new file mode 100644 index 0000000..f8377ae --- /dev/null +++ b/snippets/latex-mode/otimes @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: otimes +# key: ox +# condition: (and (texmathp) 'auto) +# group: math +# -- +\otimes \ No newline at end of file diff --git a/snippets/latex-mode/par.yasnippet b/snippets/latex-mode/par.yasnippet new file mode 100644 index 0000000..ffe3e14 --- /dev/null +++ b/snippets/latex-mode/par.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key: par +# group: sections +# name : \paragraph +# -- +\paragraph{${1:name}} +\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} +$0 \ No newline at end of file diff --git a/snippets/latex-mode/partial derivative b/snippets/latex-mode/partial derivative new file mode 100644 index 0000000..e03d286 --- /dev/null +++ b/snippets/latex-mode/partial derivative @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: partial derivative +# key: part +# condition: (texmathp) +# group: math +# -- +\\frac{\\partial $1}{\\partial ${2:x}} $0 \ No newline at end of file diff --git a/snippets/latex-mode/perp b/snippets/latex-mode/perp new file mode 100644 index 0000000..407d92e --- /dev/null +++ b/snippets/latex-mode/perp @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: perp +# key: perp +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\perp \ No newline at end of file diff --git a/snippets/latex-mode/prod.yasnippet b/snippets/latex-mode/prod.yasnippet new file mode 100644 index 0000000..7174475 --- /dev/null +++ b/snippets/latex-mode/prod.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: François Garillot +# key: prod +# group: math +# name: \prod_{n}^{} +# -- +\prod_{$1}^{$2}$0 diff --git a/snippets/latex-mode/quad b/snippets/latex-mode/quad new file mode 100644 index 0000000..0adc8c0 --- /dev/null +++ b/snippets/latex-mode/quad @@ -0,0 +1,5 @@ +# key: qq +# name: quad +# condition: (and (texmathp) 'auto) +# -- +\\quad \ No newline at end of file diff --git a/snippets/latex-mode/ref.yasnippet b/snippets/latex-mode/ref.yasnippet new file mode 100644 index 0000000..49e71d6 --- /dev/null +++ b/snippets/latex-mode/ref.yasnippet @@ -0,0 +1,7 @@ + -*- mode: snippet -*- +# contributor : Márcio M. Ribeiro +# key: ref +# group: references +# name : \ref +# -- +`(unless yas/modified-p (setq this-command 'consult-reftex-insert-reference) (consult-reftex-insert-reference nil 'dont-insert))` \ No newline at end of file diff --git a/snippets/latex-mode/row vector b/snippets/latex-mode/row vector new file mode 100644 index 0000000..2fc2c92 --- /dev/null +++ b/snippets/latex-mode/row vector @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: row vector +# key: rvec +# condition: 'auto +# group: math +# -- +\\begin{pmatrix} ${1:x}_{${2:1}} & ${3:\\dots} & $1_{${4:n}} \\end{pmatrix} \ No newline at end of file diff --git a/snippets/latex-mode/sc.yasnippet b/snippets/latex-mode/sc.yasnippet new file mode 100644 index 0000000..5194a85 --- /dev/null +++ b/snippets/latex-mode/sc.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: Rasmus Borgsmidt +# key: sc +# group: font +# name: {\sc ...} +# -- +{\scshape $1}$0 \ No newline at end of file diff --git a/snippets/latex-mode/sec b/snippets/latex-mode/sec new file mode 100644 index 0000000..7ad9a6e --- /dev/null +++ b/snippets/latex-mode/sec @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: sec +# key: sec +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\sec \ No newline at end of file diff --git a/snippets/latex-mode/sec.yasnippet b/snippets/latex-mode/sec.yasnippet new file mode 100644 index 0000000..993e5aa --- /dev/null +++ b/snippets/latex-mode/sec.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key : sec +# group: sections +# name : \section +# -- +\section{${1:name}} +\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} +$0 \ No newline at end of file diff --git a/snippets/latex-mode/secstar.yasnippet b/snippets/latex-mode/secstar.yasnippet new file mode 100644 index 0000000..1d6ff55 --- /dev/null +++ b/snippets/latex-mode/secstar.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key : sec* +# group: sections +# name : \section* +# -- +\section*{${1:name}} +$0 \ No newline at end of file diff --git a/snippets/latex-mode/set b/snippets/latex-mode/set new file mode 100644 index 0000000..efc56ff --- /dev/null +++ b/snippets/latex-mode/set @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: set +# key: set +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\left\\{ $1 \\right\\}$0 \ No newline at end of file diff --git a/snippets/latex-mode/similar b/snippets/latex-mode/similar new file mode 100644 index 0000000..0b04c3a --- /dev/null +++ b/snippets/latex-mode/similar @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: similar +# key: ~~ +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\sim \ No newline at end of file diff --git a/snippets/latex-mode/sin b/snippets/latex-mode/sin new file mode 100644 index 0000000..73edaed --- /dev/null +++ b/snippets/latex-mode/sin @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: sin +# key: sin +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\sin \ No newline at end of file diff --git a/snippets/latex-mode/ssub.yasnippet b/snippets/latex-mode/ssub.yasnippet new file mode 100644 index 0000000..c78dae6 --- /dev/null +++ b/snippets/latex-mode/ssub.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key: ssub +# group: sections +# name : \subsubsection +# -- +\subsubsection{${1:name}} +\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} +$0 \ No newline at end of file diff --git a/snippets/latex-mode/ssubstar.yasnippet b/snippets/latex-mode/ssubstar.yasnippet new file mode 100644 index 0000000..5399487 --- /dev/null +++ b/snippets/latex-mode/ssubstar.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key: ssub* +# group: sections +# name : \subsubsection* +# -- +\subsubsection*{${1:name}} +$0 \ No newline at end of file diff --git a/snippets/latex-mode/stackrel b/snippets/latex-mode/stackrel new file mode 100644 index 0000000..af78f7b --- /dev/null +++ b/snippets/latex-mode/stackrel @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: stackrel +# key: stackrel +# condition: (and (texmathp) 'auto) +# -- +\\stackrel{$1}{$0} \ No newline at end of file diff --git a/snippets/latex-mode/star b/snippets/latex-mode/star new file mode 100644 index 0000000..3f0309c --- /dev/null +++ b/snippets/latex-mode/star @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: star +# key: star +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\star \ No newline at end of file diff --git a/snippets/latex-mode/sub.yasnippet b/snippets/latex-mode/sub.yasnippet new file mode 100644 index 0000000..f71ebb2 --- /dev/null +++ b/snippets/latex-mode/sub.yasnippet @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key: sub +# group: sections +# name : \subsection +# -- +\subsection{${1:name}} +\label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} +$0 \ No newline at end of file diff --git a/snippets/latex-mode/subfig.yasnippet b/snippets/latex-mode/subfig.yasnippet new file mode 100644 index 0000000..7388475 --- /dev/null +++ b/snippets/latex-mode/subfig.yasnippet @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key: subfig +# group: environments +# name : \subfigure +# -- +\subfigure[${1:caption}]{ + \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} + $0 +} diff --git a/snippets/latex-mode/subfloat b/snippets/latex-mode/subfloat new file mode 100644 index 0000000..1c3b3d8 --- /dev/null +++ b/snippets/latex-mode/subfloat @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: subfloat +# key: subfloat +# -- +\begin{figure}[ht] + \centering + \subfloat[${6:caption}]{\includegraphics[$3]{figures/${1:path.png}}}${5:~} + \subfloat[${7:caption}]{\includegraphics[$4]{figures/${2:path.png}}} + \caption{\label{fig:${8:label}} $0} +\end{figure} diff --git a/snippets/latex-mode/subset b/snippets/latex-mode/subset new file mode 100644 index 0000000..f00a86c --- /dev/null +++ b/snippets/latex-mode/subset @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: subset +# key: cc +# group: math +# condition: (and (texmathp) 'auto) +# -- +\subset \ No newline at end of file diff --git a/snippets/latex-mode/substar.yasnippet b/snippets/latex-mode/substar.yasnippet new file mode 100644 index 0000000..3af6aae --- /dev/null +++ b/snippets/latex-mode/substar.yasnippet @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key: sub* +# group: sections +# name : \subsection* +# -- +\subsection*{${1:name}} +$0 \ No newline at end of file diff --git a/snippets/latex-mode/sum.yasnippet b/snippets/latex-mode/sum.yasnippet new file mode 100644 index 0000000..9ef9341 --- /dev/null +++ b/snippets/latex-mode/sum.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: Song Qiang +# key: sum +# group: math +# name: \sum_{n}^{} +# -- +\sum_{$1}^{$2}$0 \ No newline at end of file diff --git a/snippets/latex-mode/supremum b/snippets/latex-mode/supremum new file mode 100644 index 0000000..c5b284f --- /dev/null +++ b/snippets/latex-mode/supremum @@ -0,0 +1,6 @@ +# name: supremum +# key: sup +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\sup_{$1 \\in $2} $0 \ No newline at end of file diff --git a/snippets/latex-mode/table.yasnippet b/snippets/latex-mode/table.yasnippet new file mode 100644 index 0000000..ebcc444 --- /dev/null +++ b/snippets/latex-mode/table.yasnippet @@ -0,0 +1,14 @@ +# -*- mode: snippet -*- +# contributor : Mads D. Kristensen +# key: table +# group: environments +# name : \begin{table} ... \end{table} +# -- +\begin{table}[htbp] + \centering + \begin{tabular}{${3:format}} + $0 + \end{tabular} + \caption{${1:caption}} + \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} +\end{table} diff --git a/snippets/latex-mode/tan b/snippets/latex-mode/tan new file mode 100644 index 0000000..bc681fc --- /dev/null +++ b/snippets/latex-mode/tan @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: tan +# key: tan +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\tan \ No newline at end of file diff --git a/snippets/latex-mode/text-minus b/snippets/latex-mode/text-minus new file mode 100644 index 0000000..0c0ab41 --- /dev/null +++ b/snippets/latex-mode/text-minus @@ -0,0 +1,5 @@ +# key: tm +# name: text-minus +# condition: (and (texmathp) 'auto) +# -- +\text{-}$0 \ No newline at end of file diff --git a/snippets/latex-mode/therefore b/snippets/latex-mode/therefore new file mode 100644 index 0000000..79426fa --- /dev/null +++ b/snippets/latex-mode/therefore @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: therefore +# key: thus +# group: math +# condition: (and (texmathp) 'auto) +# -- +\\therefore \ No newline at end of file diff --git a/snippets/latex-mode/times b/snippets/latex-mode/times new file mode 100644 index 0000000..a9193a3 --- /dev/null +++ b/snippets/latex-mode/times @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: times +# key: xx +# condition: (and (texmathp) 'auto) +# group: math +# -- +\\times \ No newline at end of file diff --git a/snippets/latex-mode/to b/snippets/latex-mode/to new file mode 100644 index 0000000..c81e07c --- /dev/null +++ b/snippets/latex-mode/to @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: to +# key: -> +# condition: (and (texmathp) 'auto) +# group: math +# -- +\to \ No newline at end of file diff --git a/snippets/latex-mode/tt.yasnippet b/snippets/latex-mode/tt.yasnippet new file mode 100644 index 0000000..24461f2 --- /dev/null +++ b/snippets/latex-mode/tt.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: Rasmus Borgsmidt +# key: tt +# group: font +# name: {\tt ...} +# -- +{\tt $1}$0 \ No newline at end of file diff --git a/snippets/latex-mode/url.yasnippet b/snippets/latex-mode/url.yasnippet new file mode 100644 index 0000000..eb56f6b --- /dev/null +++ b/snippets/latex-mode/url.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: Mads D. Kristensen +# key: url +# group: environments +# name: \url +# -- +\url{${1:$$(yas/choose-value '("http" "ftp"))}://${2:address}}$0 \ No newline at end of file diff --git a/snippets/latex-mode/use.yasnippet b/snippets/latex-mode/use.yasnippet new file mode 100644 index 0000000..8b99050 --- /dev/null +++ b/snippets/latex-mode/use.yasnippet @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# contributor: Mads D. Kristensen +# key: use +# group: misc +# name: \usepackage +# -- +\usepackage[$2]{$1}$0 \ No newline at end of file diff --git a/snippets/latex-mode/vdots b/snippets/latex-mode/vdots new file mode 100644 index 0000000..c6f50b7 --- /dev/null +++ b/snippets/latex-mode/vdots @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: vdots +# key: /. +# group: math +# condition: 'auto +# -- +\\vdots \ No newline at end of file diff --git a/snippets/latex-mode/verb.yasnippet b/snippets/latex-mode/verb.yasnippet new file mode 100644 index 0000000..c63f997 --- /dev/null +++ b/snippets/latex-mode/verb.yasnippet @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# contributor: Mads D. Kristensen +# contributor : Bjorn Reese +# contributor : Song Qiang +# key: verb +# group: environments +# name: \begin{verbatim} ... \end{verbatim} +# -- +\begin{verbatim} +$0 +\end{verbatim} diff --git a/snippets/lisp-interaction-mode/.yas-parents b/snippets/lisp-interaction-mode/.yas-parents new file mode 100644 index 0000000..a7ee2e7 --- /dev/null +++ b/snippets/lisp-interaction-mode/.yas-parents @@ -0,0 +1 @@ +emacs-lisp-mode \ No newline at end of file diff --git a/snippets/matlab-mode/switch b/snippets/matlab-mode/switch new file mode 100644 index 0000000..ca5a353 --- /dev/null +++ b/snippets/matlab-mode/switch @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# contributor: Karthik Chikmagalur +# name: switch +# key: switch +# -- +switch ${1:variable} + case ${2:value} + $3 + otherwise +end + \ No newline at end of file diff --git a/snippets/minibuffer-mode/.yas-parents b/snippets/minibuffer-mode/.yas-parents new file mode 100644 index 0000000..a7ee2e7 --- /dev/null +++ b/snippets/minibuffer-mode/.yas-parents @@ -0,0 +1 @@ +emacs-lisp-mode \ No newline at end of file diff --git a/snippets/org-mode/.yas-parents b/snippets/org-mode/.yas-parents new file mode 100644 index 0000000..b4de414 --- /dev/null +++ b/snippets/org-mode/.yas-parents @@ -0,0 +1 @@ +latex-mode \ No newline at end of file diff --git a/snippets/org-mode/basic org header b/snippets/org-mode/basic org header new file mode 100644 index 0000000..b77598f --- /dev/null +++ b/snippets/org-mode/basic org header @@ -0,0 +1,19 @@ +# key:
+#+latex_CLASS: ${9:article} +#+latex_CLASS_OPTIONS: ${10:[10pt]} +#+latex_HEADER: ${11:\input{${12:`(if (boundp 'my-preamble-file) my-preamble-file "")`}}} +${13:#+bibliography: ${14:`(car reftex-default-bibliography)`}} +#+exclude_TAGS: noexport ignore +#+startup: ${15:latexpreview} ${16:hideblocks} + +$0 diff --git a/snippets/org-mode/hash-plus b/snippets/org-mode/hash-plus new file mode 100644 index 0000000..880d762 --- /dev/null +++ b/snippets/org-mode/hash-plus @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: hash-plus +# key: 3= +# condition: (and (= (- (point) (line-beginning-position)) 2) 'auto) +# -- +#+$0 \ No newline at end of file diff --git a/snippets/org-mode/latex_header_extra b/snippets/org-mode/latex_header_extra new file mode 100644 index 0000000..141b02f --- /dev/null +++ b/snippets/org-mode/latex_header_extra @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: latex_header_extra +# key: lhe +# condition: (save-excursion (backward-word) (bolp)) +# -- +#+latex_header_extra: $0 \ No newline at end of file diff --git a/snippets/org-mode/reveal-html-columns b/snippets/org-mode/reveal-html-columns new file mode 100644 index 0000000..5a88fc5 --- /dev/null +++ b/snippets/org-mode/reveal-html-columns @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: reveal-html-columns +# key: +$0 +#+REVEAL_HTML: +#+REVEAL_HTML:
+ +#+REVEAL_HTML:
\ No newline at end of file diff --git a/snippets/org-mode/reveal-html-div b/snippets/org-mode/reveal-html-div new file mode 100644 index 0000000..a2b618e --- /dev/null +++ b/snippets/org-mode/reveal-html-div @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: reveal-html-div +# key:
+$0 +#+REVEAL_HTML:
\ No newline at end of file diff --git a/snippets/org-mode/reveal-html-span b/snippets/org-mode/reveal-html-span new file mode 100644 index 0000000..fab0864 --- /dev/null +++ b/snippets/org-mode/reveal-html-span @@ -0,0 +1,6 @@ +# key: +$0 +#+REVEAL_HTML: \ No newline at end of file diff --git a/snippets/org-mode/source block b/snippets/org-mode/source block new file mode 100644 index 0000000..4c3c1e2 --- /dev/null +++ b/snippets/org-mode/source block @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: source block +# key: + /dev/null " + (shell-quote-argument s))) 0 -1) + "\">\n" + ))`${6:[VIDEO]} +#+end_export +$0 \ No newline at end of file