Update
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,13 +1,8 @@
|
||||
# generated by macOS
|
||||
.DS_Store
|
||||
|
||||
org-roam.db
|
||||
|
||||
# machine generated doom profiles or metadata
|
||||
/profiles/*.el
|
||||
/.local*/
|
||||
|
||||
# generated by elisp packages in sub-directories
|
||||
*~
|
||||
*.*~
|
||||
\#*
|
||||
|
||||
10
init.el
10
init.el
@@ -56,8 +56,10 @@
|
||||
;;For example:
|
||||
;;(use-package general :ensure (:wait t) :demand t)
|
||||
|
||||
(setq use-package-always-ensure t)
|
||||
(setq use-package-expand-minimally t)
|
||||
(setq use-package-always-ensure t
|
||||
use-package-expand-minimally t
|
||||
use-package-always-defer t
|
||||
use-package-enable-imenu-support t)
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@@ -78,7 +80,11 @@
|
||||
(require 'init-ui)
|
||||
(require 'init-bindings)
|
||||
|
||||
(require 'init-dired)
|
||||
(require 'init-dashboard)
|
||||
|
||||
(require 'init-llm)
|
||||
|
||||
|
||||
(require 'init-coding)
|
||||
(require 'init-org)
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
;; -*- lexical-binding: t -*-
|
||||
(tool-bar-mode -1)
|
||||
(scroll-bar-mode -1)
|
||||
(global-display-line-numbers-mode)
|
||||
(add-hook 'prog-mode-hook #'display-line-numbers-mode)
|
||||
(add-hook 'org-mode-hook #'display-line-numbers-mode)
|
||||
(setq-default cursor-type 'bar)
|
||||
(setq display-line-numbers 'relative)
|
||||
(show-paren-mode t)
|
||||
@@ -24,4 +25,11 @@
|
||||
|
||||
(global-set-key (kbd "C-x C-b") 'ibuffer)
|
||||
|
||||
(use-package ultra-scroll
|
||||
:init
|
||||
(setq scroll-conservatively 3
|
||||
scroll-margin 0)
|
||||
:config
|
||||
(ultra-scroll-mode 1))
|
||||
|
||||
(provide 'init-better-default)
|
||||
|
||||
@@ -7,7 +7,11 @@
|
||||
(define-key orgmode-map (kbd "n") #'org-capture)
|
||||
(define-key orgmode-map (kbd "t") #'org-todo-list)
|
||||
|
||||
(global-set-key (kbd "C-\\") #'vterm)
|
||||
|
||||
(setq duplicate-line-final-position 1)
|
||||
(global-set-key (kbd "M-p") #'duplicate-dwim)
|
||||
(global-set-key (kbd "C-c y") #'copy-from-above-command)
|
||||
(global-set-key (kbd "s-k") #'kill-current-buffer)
|
||||
|
||||
|
||||
(provide 'init-bindings)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
;; -*- lexical-binding: t -*-
|
||||
|
||||
(use-package magit
|
||||
:defer
|
||||
:bind ("C-c g" . magit-status)
|
||||
:config
|
||||
(setq magit-show-long-lines-warning nil))
|
||||
@@ -15,6 +16,26 @@
|
||||
;; :config
|
||||
;; )
|
||||
|
||||
(use-package vterm)
|
||||
(use-package vterm
|
||||
:defer
|
||||
:bind ("C-\\" . vterm))
|
||||
(use-package editorconfig
|
||||
:diminish
|
||||
:hook after-init)
|
||||
|
||||
|
||||
(use-package yaml-mode)
|
||||
;; Fish shell mode and auto-formatting
|
||||
(use-package fish-mode
|
||||
:defer t
|
||||
:commands fish_indent-before-save
|
||||
:defines eglot-server-programs
|
||||
:hook (fish-mode . (lambda ()
|
||||
"Integrate `fish_indent` formatting with Fish shell mode."
|
||||
(add-hook 'before-save-hook #'fish_indent-before-save)))
|
||||
:config
|
||||
(with-eval-after-load 'eglot
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(fish-mode . ("fish-lsp" "start")))))
|
||||
|
||||
(provide 'init-coding)
|
||||
|
||||
@@ -70,7 +70,11 @@
|
||||
:autoload (consult--read consult--customize-put)
|
||||
:commands (consult-narrow-help)
|
||||
:functions (list-colors-duplicates consult-colors--web-list)
|
||||
:bind (("C-s" . consult-line)))
|
||||
:bind (("s-f" . consult-line)
|
||||
("C-c s s" . consult-line)
|
||||
("C-c p f" . consult-project-buffer)
|
||||
("C-c f r" . consult-recent-file)
|
||||
("C-c s p" . consult-ripgrep)))
|
||||
|
||||
|
||||
(use-package consult-dir
|
||||
|
||||
10
lisp/init-dashboard.el
Normal file
10
lisp/init-dashboard.el
Normal file
@@ -0,0 +1,10 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package dashboard
|
||||
:demand t
|
||||
:bind ("<f2>" . dashboard-open)
|
||||
:config
|
||||
(dashboard-setup-startup-hook))
|
||||
|
||||
|
||||
(provide 'init-dashboard)
|
||||
16
lisp/init-dired.el
Normal file
16
lisp/init-dired.el
Normal file
@@ -0,0 +1,16 @@
|
||||
;; -*- lexical-binding: t -*-
|
||||
|
||||
(use-package dired
|
||||
:ensure nil
|
||||
:bind (:map dired-mode-map
|
||||
("C-c C-p" . wdired-change-to-wdired-mode))
|
||||
:config
|
||||
;; Always delete and copy recursively
|
||||
(setq dired-recursive-deletes 'always
|
||||
dired-recursive-copies 'always)
|
||||
|
||||
;; Show directory first
|
||||
;; (setq dired-listing-switches "-alh --group-directories-first")
|
||||
)
|
||||
|
||||
(provide 'init-dired)
|
||||
@@ -9,7 +9,28 @@
|
||||
:init
|
||||
(winum-mode)
|
||||
:config
|
||||
(winum-set-keymap-prefix (kbd "C-c w")) )
|
||||
(winum-set-keymap-prefix (kbd "C-c w")))
|
||||
|
||||
;; Yasnippet settings
|
||||
(use-package yasnippet
|
||||
:ensure t
|
||||
:hook ((LaTeX-mode . yas-minor-mode)
|
||||
(post-self-insert . my/yas-try-expanding-auto-snippets))
|
||||
:config
|
||||
(use-package warnings
|
||||
:config
|
||||
(cl-pushnew '(yasnippet backquote-change)
|
||||
warning-suppress-types
|
||||
:test 'equal))
|
||||
|
||||
(setq yas-triggers-in-field t)
|
||||
|
||||
;; Function that tries to autoexpand YaSnippets
|
||||
;; The double quoting is NOT a typo!
|
||||
(defun my/yas-try-expanding-auto-snippets ()
|
||||
(when (and (boundp 'yas-minor-mode) yas-minor-mode)
|
||||
(let ((yas-buffer-local-condition ''(require-snippet-condition . auto)))
|
||||
(yas-expand)))))
|
||||
|
||||
|
||||
(provide 'init-edit)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
;; -*- lexical-binding: t -*-
|
||||
|
||||
(defun meow-setup ()
|
||||
(defun meow-setup()
|
||||
(setq meow-cheatsheet-layout meow-cheatsheet-layout-qwerty)
|
||||
(meow-motion-define-key
|
||||
'("j" . meow-next)
|
||||
@@ -84,6 +84,7 @@
|
||||
'("<escape>" . ignore)))
|
||||
|
||||
(use-package meow
|
||||
:demand t
|
||||
:init
|
||||
(meow-global-mode 1)
|
||||
:config
|
||||
|
||||
@@ -9,17 +9,57 @@
|
||||
:defer
|
||||
:ensure `(org :repo "https://code.tecosaur.net/tec/org-mode.git/"
|
||||
:branch "dev")
|
||||
:hook (org-mode . org-modern-mode)
|
||||
;; :hook (org-mode . org-indent-mode)
|
||||
:config
|
||||
;; (org-capture-init)
|
||||
(add-to-list 'org-modules 'org-habit)
|
||||
(setq org-modules '(org-habit))
|
||||
(setq org-directory "~/org/")
|
||||
(add-to-list 'org-agenda-files "~/org")
|
||||
)
|
||||
|
||||
(use-package org-contrib)
|
||||
|
||||
(with-eval-after-load 'org
|
||||
(setq org-highlight-latex-and-related '(native script entities)))
|
||||
|
||||
(use-package org-modern
|
||||
:hook (org-mode . org-modern-mode)
|
||||
:hook (org-agenda-finalize . org-modern-agenda)
|
||||
:init
|
||||
(with-eval-after-load 'org
|
||||
(setq org-hide-emphasis-markers t
|
||||
org-pretty-entities t))
|
||||
:config
|
||||
(setq org-modern-table nil))
|
||||
(use-package org-appear
|
||||
:defer)
|
||||
|
||||
(use-package hl-todo
|
||||
:hook (prog-mode . hl-todo-mode)
|
||||
:hook (yaml-mode . hl-todo-mode)
|
||||
:config
|
||||
(setq hl-todo-highlight-punctuation ":"
|
||||
hl-todo-keyword-faces
|
||||
'(;; For reminders to change or add something at a later date.
|
||||
("TODO" warning bold)
|
||||
;; For code (or code paths) that are broken, unimplemented, or slow,
|
||||
;; and may become bigger problems later.
|
||||
("FIXME" error bold)
|
||||
;; For code that needs to be revisited later, either to upstream it,
|
||||
;; improve it, or address non-critical issues.
|
||||
("REVIEW" font-lock-keyword-face bold)
|
||||
;; For code smells where questionable practices are used
|
||||
;; intentionally, and/or is likely to break in a future update.
|
||||
("HACK" font-lock-constant-face bold)
|
||||
;; For sections of code that just gotta go, and will be gone soon.
|
||||
;; Specifically, this means the code is deprecated, not necessarily
|
||||
;; the feature it enables.
|
||||
("DEPRECATED" font-lock-doc-face bold)
|
||||
;; Extra keywords commonly found in the wild, whose meaning may vary
|
||||
;; from project to project.
|
||||
("NOTE" success bold)
|
||||
("BUG" error bold)
|
||||
("XXX" font-lock-constant-face bold))))
|
||||
|
||||
(use-package org-latex-preview
|
||||
:defer
|
||||
@@ -55,6 +95,7 @@
|
||||
|
||||
(use-package org-roam
|
||||
:ensure t
|
||||
:defer
|
||||
:custom
|
||||
(org-roam-directory (file-truename "~/org/roam"))
|
||||
:bind (("C-c n l" . org-roam-buffer-toggle)
|
||||
@@ -71,6 +112,7 @@
|
||||
;; If using org-roam-protocol
|
||||
(require 'org-roam-protocol))
|
||||
|
||||
(use-package org-roam-ui)
|
||||
(use-package org-roam-ui
|
||||
:defer t)
|
||||
|
||||
(provide 'init-org)
|
||||
|
||||
67
lisp/init-tex.el
Normal file
67
lisp/init-tex.el
Normal file
@@ -0,0 +1,67 @@
|
||||
|
||||
|
||||
(use-package latex
|
||||
:ensure auctex
|
||||
:hook ((LaTeX-mode . prettify-symbols-mode))
|
||||
:bind (:map LaTeX-mode-map
|
||||
("C-S-e" . latex-math-from-calc))
|
||||
:config
|
||||
;; Format math as a Latex string with Calc
|
||||
(defun latex-math-from-calc ()
|
||||
"Evaluate `calc' on the contents of line at point."
|
||||
(interactive)
|
||||
(cond ((region-active-p)
|
||||
(let* ((beg (region-beginning))
|
||||
(end (region-end))
|
||||
(string (buffer-substring-no-properties beg end)))
|
||||
(kill-region beg end)
|
||||
(insert (calc-eval `(,string calc-language latex
|
||||
calc-prefer-frac t
|
||||
calc-angle-mode rad)))))
|
||||
(t (let ((l (thing-at-point 'line)))
|
||||
(end-of-line 1) (kill-line 0)
|
||||
(insert (calc-eval `(,l
|
||||
calc-language latex
|
||||
calc-prefer-frac t
|
||||
calc-angle-mode rad))))))))
|
||||
(use-package cdlatex
|
||||
:ensure t
|
||||
:hook (LaTeX-mode . turn-on-cdlatex)
|
||||
:bind (:map cdlatex-mode-map
|
||||
("<tab>" . cdlatex-tab)))
|
||||
(use-package cdlatex
|
||||
:hook ((cdlatex-tab . yas-expand)
|
||||
(cdlatex-tab . cdlatex-in-yas-field))
|
||||
:config
|
||||
(use-package yasnippet
|
||||
:bind (:map yas-keymap
|
||||
("<tab>" . yas-next-field-or-cdlatex)
|
||||
("TAB" . yas-next-field-or-cdlatex))
|
||||
:config
|
||||
(defun cdlatex-in-yas-field ()
|
||||
;; Check if we're at the end of the Yas field
|
||||
(when-let* ((_ (overlayp yas--active-field-overlay))
|
||||
(end (overlay-end yas--active-field-overlay)))
|
||||
(if (>= (point) end)
|
||||
;; Call yas-next-field if cdlatex can't expand here
|
||||
(let ((s (thing-at-point 'sexp)))
|
||||
(unless (and s (assoc (substring-no-properties s)
|
||||
cdlatex-command-alist-comb))
|
||||
(yas-next-field-or-maybe-expand)
|
||||
t))
|
||||
;; otherwise expand and jump to the correct location
|
||||
(let (cdlatex-tab-hook minp)
|
||||
(setq minp
|
||||
(min (save-excursion (cdlatex-tab)
|
||||
(point))
|
||||
(overlay-end yas--active-field-overlay)))
|
||||
(goto-char minp) t))))
|
||||
|
||||
(defun yas-next-field-or-cdlatex nil
|
||||
(interactive)
|
||||
"Jump to the next Yas field correctly with cdlatex active."
|
||||
(if
|
||||
(or (bound-and-true-p cdlatex-mode)
|
||||
(bound-and-true-p org-cdlatex-mode))
|
||||
(cdlatex-tab)
|
||||
(yas-next-field-or-maybe-expand)))))
|
||||
@@ -73,12 +73,12 @@
|
||||
|
||||
(pcase system-type
|
||||
('darwin ; macOS
|
||||
(set-face-attribute 'default nil :font "Maple Mono-16")
|
||||
(set-face-attribute 'default nil :font "Maple Mono NF CN-18")
|
||||
(add-to-list 'default-frame-alist '(height . 53))
|
||||
(add-to-list 'default-frame-alist '(width . 120)))
|
||||
|
||||
('gnu/linux ; Linux (including Debian)
|
||||
(set-face-attribute 'default nil :font "Maple Mono-16") ; 20 * 1.5
|
||||
(set-face-attribute 'default nil :font "Maple Mono NF CN-18") ; 20 * 1.5
|
||||
(add-to-list 'default-frame-alist '(height . 40))
|
||||
(add-to-list 'default-frame-alist '(width . 100))))
|
||||
|
||||
|
||||
BIN
org-roam.db
Normal file
BIN
org-roam.db
Normal file
Binary file not shown.
5
snippets/emacs-lisp-mode/get-buffer
Normal file
5
snippets/emacs-lisp-mode/get-buffer
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: get-buffer
|
||||
# key: gb
|
||||
# --
|
||||
(get-buffer "${1:`(read-buffer "Buffer:")`}")$0
|
||||
5
snippets/emacs-lisp-mode/get-buffer-create
Normal file
5
snippets/emacs-lisp-mode/get-buffer-create
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: get-buffer-create
|
||||
# key: gbc
|
||||
# --
|
||||
(get-buffer-create $0)
|
||||
5
snippets/emacs-lisp-mode/message
Normal file
5
snippets/emacs-lisp-mode/message
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: message
|
||||
# key: msg
|
||||
# --
|
||||
(message ${1:(format "$2")})$0
|
||||
5
snippets/emacs-lisp-mode/paren-insert
Normal file
5
snippets/emacs-lisp-mode/paren-insert
Normal file
@@ -0,0 +1,5 @@
|
||||
# key: mk
|
||||
# name: paren-insert
|
||||
# condition: 'auto
|
||||
# --
|
||||
($0)
|
||||
5
snippets/emacs-lisp-mode/point-max
Normal file
5
snippets/emacs-lisp-mode/point-max
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: point-max
|
||||
# key: pM
|
||||
# --
|
||||
(point-max)
|
||||
5
snippets/emacs-lisp-mode/pp
Normal file
5
snippets/emacs-lisp-mode/pp
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: pp
|
||||
# key: pp
|
||||
# --
|
||||
(pp $3 $1)$0
|
||||
4
snippets/eshell-mode/for
Normal file
4
snippets/eshell-mode/for
Normal file
@@ -0,0 +1,4 @@
|
||||
#name : Eshell for loop
|
||||
#key : for
|
||||
# --
|
||||
for f in ${1:*} { ${2:echo} "$f"; $3} $0
|
||||
1
snippets/inferior-emacs-lisp-mode/.yas-parents
Normal file
1
snippets/inferior-emacs-lisp-mode/.yas-parents
Normal file
@@ -0,0 +1 @@
|
||||
emacs-lisp-mode
|
||||
0
snippets/latex-mode/.yas-make-groups
Normal file
0
snippets/latex-mode/.yas-make-groups
Normal file
1
snippets/latex-mode/.yas-parents
Normal file
1
snippets/latex-mode/.yas-parents
Normal file
@@ -0,0 +1 @@
|
||||
text-mode
|
||||
4
snippets/latex-mode/2-vector
Normal file
4
snippets/latex-mode/2-vector
Normal file
@@ -0,0 +1,4 @@
|
||||
# key: vec2
|
||||
# name: 2-vector
|
||||
# --
|
||||
\\begin{bmatrix} ${1:x}_{${2:1}} \\\\ ${3:$1}_{${4:2}} \\end{bmatrix}
|
||||
29
snippets/latex-mode/Basic template
Normal file
29
snippets/latex-mode/Basic template
Normal file
@@ -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}
|
||||
10
snippets/latex-mode/Diagonal bmatrix
Normal file
10
snippets/latex-mode/Diagonal bmatrix
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Diagonal bmatrix
|
||||
# key: diag3
|
||||
# group: math
|
||||
# --
|
||||
\\begin{bmatrix}
|
||||
${1:\\ddots} & & \\\\
|
||||
& ${2:\\ddots} & \\\\
|
||||
& & ${3:\\ddots}
|
||||
\\end{bmatrix}
|
||||
6
snippets/latex-mode/Display Math
Normal file
6
snippets/latex-mode/Display Math
Normal file
@@ -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 \]
|
||||
7
snippets/latex-mode/Exists
Normal file
7
snippets/latex-mode/Exists
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Exists
|
||||
# key: EE
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# group: math
|
||||
# --
|
||||
\\exists
|
||||
16
snippets/latex-mode/Fraction auto
Normal file
16
snippets/latex-mode/Fraction auto
Normal file
@@ -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)))
|
||||
17
snippets/latex-mode/Fraction slash
Normal file
17
snippets/latex-mode/Fraction slash
Normal file
@@ -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)))
|
||||
6
snippets/latex-mode/Inline Math
Normal file
6
snippets/latex-mode/Inline Math
Normal file
@@ -0,0 +1,6 @@
|
||||
# key: mk
|
||||
# name: Inline Math
|
||||
# condition: (and (not (texmathp)) (quote auto))
|
||||
# group: math
|
||||
# --
|
||||
\\( $0 \\)
|
||||
19
snippets/latex-mode/Tikz Plot
Normal file
19
snippets/latex-mode/Tikz Plot
Normal file
@@ -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}
|
||||
7
snippets/latex-mode/To the power
Normal file
7
snippets/latex-mode/To the power
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: To the power
|
||||
# key: pw
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# group: math
|
||||
# --
|
||||
^{$0}
|
||||
7
snippets/latex-mode/^2
Normal file
7
snippets/latex-mode/^2
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: ^2
|
||||
# key: sr
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# group: math
|
||||
# --
|
||||
^2$0
|
||||
7
snippets/latex-mode/^3
Normal file
7
snippets/latex-mode/^3
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: ^3
|
||||
# key: cb
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# group: math
|
||||
# --
|
||||
^3$0
|
||||
9
snippets/latex-mode/abstract.yasnippet
Normal file
9
snippets/latex-mode/abstract.yasnippet
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor : Mads D. Kristensen <madsdk@gmail.com>
|
||||
# key : abstract
|
||||
# group: sections
|
||||
# name : \abstract
|
||||
# --
|
||||
\begin{abstract}
|
||||
$0
|
||||
\end{abstract}
|
||||
7
snippets/latex-mode/adjoint
Normal file
7
snippets/latex-mode/adjoint
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: adjoint
|
||||
# key: adj
|
||||
# group: math
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# --
|
||||
`(delete-backward-char 1)`^{\\dagger}$0
|
||||
9
snippets/latex-mode/align.yasnippet
Normal file
9
snippets/latex-mode/align.yasnippet
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor : Rasmus Borgsmidt <rasmus@borgsmidt.dk>
|
||||
# key : align
|
||||
# group: environments
|
||||
# name : \begin{align} ... \end{align}
|
||||
# --
|
||||
\begin{align}
|
||||
$0
|
||||
\end{align}
|
||||
9
snippets/latex-mode/alignstar.yasnippet
Normal file
9
snippets/latex-mode/alignstar.yasnippet
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor : Rasmus Borgsmidt <rasmus@borgsmidt.dk>
|
||||
# key : align*
|
||||
# group: environments
|
||||
# name : \begin{align*} ... \end{align*}
|
||||
# --
|
||||
\begin{align*}
|
||||
$0
|
||||
\end{align*}
|
||||
7
snippets/latex-mode/arccos
Normal file
7
snippets/latex-mode/arccos
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: arccos
|
||||
# key: arccos
|
||||
# group: math
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# --
|
||||
\\arccos
|
||||
7
snippets/latex-mode/arccot
Normal file
7
snippets/latex-mode/arccot
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: arccot
|
||||
# key: arccot
|
||||
# group: math
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# --
|
||||
\\arccot
|
||||
7
snippets/latex-mode/arccsc
Normal file
7
snippets/latex-mode/arccsc
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: arccsc
|
||||
# key: arccsc
|
||||
# group: math
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# --
|
||||
\\arccsc
|
||||
7
snippets/latex-mode/arcsec
Normal file
7
snippets/latex-mode/arcsec
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: arcsec
|
||||
# key: arcsec
|
||||
# group: math
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# --
|
||||
\\arcsec
|
||||
7
snippets/latex-mode/arcsin
Normal file
7
snippets/latex-mode/arcsin
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: arcsin
|
||||
# key: arcsin
|
||||
# group: math
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# --
|
||||
\\arcsin
|
||||
7
snippets/latex-mode/arctan
Normal file
7
snippets/latex-mode/arctan
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: arctan
|
||||
# key: arctan
|
||||
# group: math
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# --
|
||||
\\arctan
|
||||
9
snippets/latex-mode/array.yasnippet
Normal file
9
snippets/latex-mode/array.yasnippet
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor : Peter Urbak <peter@dragonwasrobot.com>
|
||||
# key : arr
|
||||
# group: environments
|
||||
# name : \begin{array} ... \end{array}
|
||||
# --
|
||||
\begin{array}{$1}
|
||||
$0
|
||||
\end{array}
|
||||
28
snippets/latex-mode/article.yasnippet
Normal file
28
snippets/latex-mode/article.yasnippet
Normal file
@@ -0,0 +1,28 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Mads D. Kristensen <madsdk@gmail.com>
|
||||
# contributor : Song Qiang <tsiangsung@gmail.com>
|
||||
# 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}
|
||||
15
snippets/latex-mode/bar
Normal file
15
snippets/latex-mode/bar
Normal file
@@ -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) "") "}"))
|
||||
17
snippets/latex-mode/basict
Normal file
17
snippets/latex-mode/basict
Normal file
@@ -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}
|
||||
5
snippets/latex-mode/bbm1
Normal file
5
snippets/latex-mode/bbm1
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: bbm1
|
||||
# key: 11
|
||||
# --
|
||||
\mathbbm{1}
|
||||
37
snippets/latex-mode/beamer.yasnippet
Normal file
37
snippets/latex-mode/beamer.yasnippet
Normal file
@@ -0,0 +1,37 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Claudio Marforio <marforio@gmail.com>
|
||||
# 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}
|
||||
10
snippets/latex-mode/begin.yasnippet
Normal file
10
snippets/latex-mode/begin.yasnippet
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Mads D. Kristensen <madsdk@gmail.com>
|
||||
# contributor : Bjorn Reese <breese@users.sourceforge.net>
|
||||
# key: begin
|
||||
# group: environments
|
||||
# name: \begin{environment} ... \end{environment}
|
||||
# --
|
||||
\begin{${1:$$(yas/choose-value (mapcar 'car (LaTeX-environment-list)))}}
|
||||
$0
|
||||
\end{$1}
|
||||
8
snippets/latex-mode/bib.yasnippet
Normal file
8
snippets/latex-mode/bib.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Mads D. Kristensen <madsdk@gmail.com>
|
||||
# key: bib
|
||||
# group: misc
|
||||
# name: \bibliography
|
||||
# --
|
||||
\bibliographystyle{plain}
|
||||
\bibliography{$1}$0
|
||||
7
snippets/latex-mode/big.yasnippet
Normal file
7
snippets/latex-mode/big.yasnippet
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Song Qiang <tsiangsung@gmail.com>
|
||||
# key: big
|
||||
# group: math
|
||||
# name: \bigl( ... \bigr)
|
||||
# --
|
||||
\\${1:$$(yas/choose-value '("big" "Big" "bigg" "Bigg"))}l( $0 \\$1r)
|
||||
7
snippets/latex-mode/bigop.yasnippet
Normal file
7
snippets/latex-mode/bigop.yasnippet
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: François Garillot <francois@garillot.net>
|
||||
# key: bigop
|
||||
# group: math
|
||||
# name: \bigop_{n}^{}
|
||||
# --
|
||||
\\big${1:$$(yas/choose-value '("oplus" "otimes" "odot" "cup" "cap" "uplus" "sqcup" "vee" "wedge"))}_{$2}^{$3}$0
|
||||
7
snippets/latex-mode/binom.yasnippet
Normal file
7
snippets/latex-mode/binom.yasnippet
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Song Qiang <tsiangsung@gmail.com>
|
||||
# key: binom
|
||||
# group: math
|
||||
# name: \binom{n}{k}
|
||||
# --
|
||||
\binom{${1:n}}{${2:k}}
|
||||
9
snippets/latex-mode/block.yasnippet
Normal file
9
snippets/latex-mode/block.yasnippet
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Claudio Marforio <marforio@gmail.com>
|
||||
# key: block
|
||||
# group: environments
|
||||
# name : \begin{*block} ... \end{*block}
|
||||
# --
|
||||
\begin{${1:$$(yas/choose-value '("block" "exampleblock" "alertblock"))}}{${2:Block Title}}
|
||||
|
||||
\end{$1}
|
||||
8
snippets/latex-mode/bmatrix (2 x 2)
Normal file
8
snippets/latex-mode/bmatrix (2 x 2)
Normal file
@@ -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}
|
||||
8
snippets/latex-mode/bmatrix (3 x 3)
Normal file
8
snippets/latex-mode/bmatrix (3 x 3)
Normal file
@@ -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}
|
||||
7
snippets/latex-mode/bold.yasnippet
Normal file
7
snippets/latex-mode/bold.yasnippet
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Márcio M. Ribeiro <marcio.mr@gmail.com>
|
||||
# key: bf
|
||||
# group: font
|
||||
# name: {\bf ... }
|
||||
# --
|
||||
{\bf $1}$0
|
||||
9
snippets/latex-mode/case.yasnippet
Normal file
9
snippets/latex-mode/case.yasnippet
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Mads D. Kristensen <madsdk@gmail.com>
|
||||
# key: case
|
||||
# group: math
|
||||
# name: \begin{cases} ... \end{cases}
|
||||
# --
|
||||
\begin{cases}
|
||||
$0 \\\\
|
||||
\end{cases}
|
||||
9
snippets/latex-mode/cases
Normal file
9
snippets/latex-mode/cases
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: cases
|
||||
# key: case
|
||||
# condition: (texmathp)
|
||||
# group: math
|
||||
# --
|
||||
\\begin{cases}
|
||||
$1
|
||||
\\end{cases}$0
|
||||
7
snippets/latex-mode/ceiling function
Normal file
7
snippets/latex-mode/ceiling function
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: ceiling function
|
||||
# key: ceil
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# group: math
|
||||
# --
|
||||
\\left\\lceil $1 \\right\\rceil $0
|
||||
9
snippets/latex-mode/cha.yasnippet
Normal file
9
snippets/latex-mode/cha.yasnippet
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor : Mads D. Kristensen <madsdk@gmail.com>
|
||||
# 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
|
||||
8
snippets/latex-mode/chastar.yasnippet
Normal file
8
snippets/latex-mode/chastar.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor : Mads D. Kristensen <madsdk@gmail.com>
|
||||
# key : cha*
|
||||
# group: sections
|
||||
# name : \chapter*
|
||||
# --
|
||||
\chapter*{${1:name}}
|
||||
$0
|
||||
7
snippets/latex-mode/cite.yasnippet
Normal file
7
snippets/latex-mode/cite.yasnippet
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor : Marcio M. Ribeiro <marcio.mr@gmail.com>
|
||||
# key: cite
|
||||
# group: references
|
||||
# name : \cite
|
||||
# --
|
||||
`(unless yas-modified-p (setq this-command 'citar-insert-citation) (call-interactively 'citar-insert-citation))`
|
||||
7
snippets/latex-mode/code
Normal file
7
snippets/latex-mode/code
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: code
|
||||
# key: code
|
||||
# --
|
||||
\begin{lstlisting}${1:[language=${2:Matlab}]}
|
||||
$0
|
||||
\end{lstlisting}
|
||||
7
snippets/latex-mode/column vector
Normal file
7
snippets/latex-mode/column vector
Normal file
@@ -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}
|
||||
7
snippets/latex-mode/column-separator
Normal file
7
snippets/latex-mode/column-separator
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: column-separator
|
||||
# key: ,,
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# group: math
|
||||
# --
|
||||
& $0
|
||||
13
snippets/latex-mode/columns
Normal file
13
snippets/latex-mode/columns
Normal file
@@ -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}
|
||||
7
snippets/latex-mode/complex conjugate
Normal file
7
snippets/latex-mode/complex conjugate
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: complex conjugate
|
||||
# key: cj
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# group: math
|
||||
# --
|
||||
^{\\star}$0
|
||||
7
snippets/latex-mode/coprod.yasnippet
Normal file
7
snippets/latex-mode/coprod.yasnippet
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: François Garillot <francois@garillot.net>
|
||||
# key: coprod
|
||||
# group: math
|
||||
# name: \coprod_{n}^{}
|
||||
# --
|
||||
\coprod_{$1}^{$2}$0
|
||||
7
snippets/latex-mode/cos
Normal file
7
snippets/latex-mode/cos
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: cos
|
||||
# key: cos
|
||||
# group: math
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# --
|
||||
\\cos
|
||||
7
snippets/latex-mode/cot
Normal file
7
snippets/latex-mode/cot
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: cot
|
||||
# key: cot
|
||||
# group: math
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# --
|
||||
\\cot
|
||||
7
snippets/latex-mode/csc
Normal file
7
snippets/latex-mode/csc
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: csc
|
||||
# key: csc
|
||||
# group: math
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# --
|
||||
\\csc
|
||||
7
snippets/latex-mode/d-by-dt
Normal file
7
snippets/latex-mode/d-by-dt
Normal file
@@ -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
|
||||
7
snippets/latex-mode/ddots
Normal file
7
snippets/latex-mode/ddots
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: ddots
|
||||
# key: /,
|
||||
# group: math
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# --
|
||||
\\ddots
|
||||
7
snippets/latex-mode/definite integral
Normal file
7
snippets/latex-mode/definite integral
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: definite integral
|
||||
# key: dint
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# group: math
|
||||
# --
|
||||
\\int_{${1:-\\infty}}^{${2:\\infty}}$0
|
||||
9
snippets/latex-mode/desc.yasnippet
Normal file
9
snippets/latex-mode/desc.yasnippet
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor : Mads D. Kristensen <madsdk@gmail.com>
|
||||
# key : desc
|
||||
# group: environments
|
||||
# name : \begin{description} ... \end{description}
|
||||
# --
|
||||
\begin{description}
|
||||
\item[${1:label}] $0
|
||||
\end{description}
|
||||
10
snippets/latex-mode/doc.yasnippet
Normal file
10
snippets/latex-mode/doc.yasnippet
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Mads D. Kristensen <madsdk@gmail.com>
|
||||
# key: doc
|
||||
# name: \documentclass
|
||||
# --
|
||||
\documentclass[$2]{${1:$$(yas/choose-value '("article" "report" "book" "letter"))}}
|
||||
|
||||
\begin{document}
|
||||
$0
|
||||
\end{document}
|
||||
7
snippets/latex-mode/dots
Normal file
7
snippets/latex-mode/dots
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: dots
|
||||
# key: ...
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# group: math
|
||||
# --
|
||||
\\dots$0
|
||||
7
snippets/latex-mode/em.yasnippet
Normal file
7
snippets/latex-mode/em.yasnippet
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Márcio M. Ribeiro <marcio.mr@gmail.com>
|
||||
# key: em
|
||||
# group: font
|
||||
# name: {\em ...}
|
||||
# --
|
||||
{\em $1}$0
|
||||
9
snippets/latex-mode/enum.yasnippet
Normal file
9
snippets/latex-mode/enum.yasnippet
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor : Mads D. Kristensen <madsdk@gmail.com>
|
||||
# key: enum
|
||||
# group: environments
|
||||
# name : \begin{enumerate} ... \end{enumerate}
|
||||
# --
|
||||
\begin{enumerate}
|
||||
\item $0
|
||||
\end{enumerate}
|
||||
10
snippets/latex-mode/eq.yasnippet
Normal file
10
snippets/latex-mode/eq.yasnippet
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Mads D. Kristensen <madsdk@gmail.com>
|
||||
# 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}
|
||||
10
snippets/latex-mode/eqs.yasnippet
Normal file
10
snippets/latex-mode/eqs.yasnippet
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Mads D. Kristensen <madsdk@gmail.com>
|
||||
# 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}
|
||||
6
snippets/latex-mode/equiv
Normal file
6
snippets/latex-mode/equiv
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: equiv
|
||||
# key: eqv
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# --
|
||||
\\equiv$0
|
||||
7
snippets/latex-mode/exp
Normal file
7
snippets/latex-mode/exp
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: exp
|
||||
# key: exp
|
||||
# group: math
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# --
|
||||
\\exp
|
||||
12
snippets/latex-mode/fig.yasnippet
Normal file
12
snippets/latex-mode/fig.yasnippet
Normal file
@@ -0,0 +1,12 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor : Mads D. Kristensen <madsdk@gmail.com>
|
||||
# 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}
|
||||
7
snippets/latex-mode/floor function
Normal file
7
snippets/latex-mode/floor function
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: floor function
|
||||
# key: floor
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# group: math
|
||||
# --
|
||||
\\left\\lfloor $1 \\right\\rfloor $0
|
||||
6
snippets/latex-mode/forall
Normal file
6
snippets/latex-mode/forall
Normal file
@@ -0,0 +1,6 @@
|
||||
# key: VV
|
||||
# name: forall
|
||||
# condition: (and (texmathp) (quote auto))
|
||||
# group: math
|
||||
# --
|
||||
\\forall$0
|
||||
7
snippets/latex-mode/frac.yasnippet
Normal file
7
snippets/latex-mode/frac.yasnippet
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Song Qiang <tsiangsung@gmail.com>
|
||||
# key: frac
|
||||
# group: math
|
||||
# name: \frac{numerator}{denominator}
|
||||
# --
|
||||
\frac{${1:numerator}}{${2:denominator}}$0
|
||||
9
snippets/latex-mode/frame.yasnippet
Normal file
9
snippets/latex-mode/frame.yasnippet
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Claudio Marforio <marforio@gmail.com>
|
||||
# key: frame
|
||||
# group: environments
|
||||
# name : \begin{frame} ... \end{frame}
|
||||
# --
|
||||
\begin{frame}{${1:Frame Title$(capitalize yas-text)}}
|
||||
$0
|
||||
\end{frame}
|
||||
8
snippets/latex-mode/gls.yasnippet
Normal file
8
snippets/latex-mode/gls.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor : Peter Urbak <peter@dragonwasrobot.com>
|
||||
# key : newgls
|
||||
# group: misc
|
||||
# name : \newglossaryentry{...}{...}
|
||||
# --
|
||||
\newglossaryentry{$1}{name={$1},
|
||||
description={$2.}}
|
||||
6
snippets/latex-mode/graphics.yasnippet
Normal file
6
snippets/latex-mode/graphics.yasnippet
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor : Mads D. Kristensen <madsdk@gmail.com>
|
||||
# key : graphics
|
||||
# name : \includegraphics
|
||||
# --
|
||||
\includegraphics[width=${1:\linewidth}]{${2:file}}
|
||||
7
snippets/latex-mode/greater greater
Normal file
7
snippets/latex-mode/greater greater
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: greater greater
|
||||
# key: >>
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# group: math
|
||||
# --
|
||||
\\gg
|
||||
7
snippets/latex-mode/greater or equal
Normal file
7
snippets/latex-mode/greater or equal
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: greater or equal
|
||||
# key: geq
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# group: math
|
||||
# --
|
||||
\\ge
|
||||
15
snippets/latex-mode/hat
Normal file
15
snippets/latex-mode/hat
Normal file
@@ -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) "") "}"))
|
||||
6
snippets/latex-mode/href.yasnippet
Normal file
6
snippets/latex-mode/href.yasnippet
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: href
|
||||
# group: environments
|
||||
# name: \href{url}{text}
|
||||
# --
|
||||
\href{${1:url}}{${2:text}}$0
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user