Initial commit
This commit is contained in:
18
config.el
Normal file
18
config.el
Normal file
@@ -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 "<backspace>") (kbd "C-h"))))
|
||||
44
config.org
Normal file
44
config.org
Normal file
@@ -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 "<backspace>") (kbd "C-h"))))
|
||||
#+end_src
|
||||
93
config_bak.el
Normal file
93
config_bak.el
Normal file
@@ -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 "<backspace>") (kbd "C-h"))))
|
||||
197
init.el
Normal file
197
init.el
Normal file
@@ -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))
|
||||
9
packages.el
Normal file
9
packages.el
Normal file
@@ -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"))))
|
||||
1
snippets/.gitignore
vendored
Normal file
1
snippets/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.el
|
||||
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
|
||||
6
snippets/latex-mode/if and only if
Normal file
6
snippets/latex-mode/if and only if
Normal file
@@ -0,0 +1,6 @@
|
||||
# key: iff
|
||||
# name: if and only if
|
||||
# condition: (and (texmathp) (quote auto))
|
||||
# group: math
|
||||
# --
|
||||
\iff
|
||||
7
snippets/latex-mode/implied by
Normal file
7
snippets/latex-mode/implied by
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: implied by
|
||||
# key: <=
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# group: math
|
||||
# --
|
||||
\\impliedby $0
|
||||
6
snippets/latex-mode/implies
Normal file
6
snippets/latex-mode/implies
Normal file
@@ -0,0 +1,6 @@
|
||||
# key: =>
|
||||
# name: implies
|
||||
# condition: (and (texmathp) (quote auto))
|
||||
# group: math
|
||||
# --
|
||||
\implies$0
|
||||
7
snippets/latex-mode/in
Normal file
7
snippets/latex-mode/in
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: in
|
||||
# key: inn
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# group: math
|
||||
# --
|
||||
\\in
|
||||
5
snippets/latex-mode/includegraphics
Normal file
5
snippets/latex-mode/includegraphics
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: includegraphics
|
||||
# key: ig
|
||||
# --
|
||||
\includegraphics${1:[$2]}{$0}
|
||||
7
snippets/latex-mode/infimum
Normal file
7
snippets/latex-mode/infimum
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: infimum
|
||||
# key: inf
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# group: math
|
||||
# --
|
||||
\\inf_{$1 \\in $2} $0
|
||||
8
snippets/latex-mode/int.yasnippet
Normal file
8
snippets/latex-mode/int.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Song Qiang <tsiangsung@gmail.com>
|
||||
# key: integ
|
||||
# group: math
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# name: Indefinite integral (all)
|
||||
# --
|
||||
\\${1:$$(yas/choose-value '("int" "oint" "iint" "iiint" "iiiint" "idotsint"))}$0
|
||||
7
snippets/latex-mode/inverse
Normal file
7
snippets/latex-mode/inverse
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: inverse
|
||||
# key: inv
|
||||
# condition: (and (texmathp) 'auto)
|
||||
# group: math
|
||||
# --
|
||||
^{\text{-}1}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user