ywangmy / yasnippets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

For LaTeX:

  • Greek letters: using cdlatex

    ./demo/cdlatex.gif

  • Intelligent fraction and subscripts: using aas and laas.

    ./demo/aas.gif

  • Modifiers
    • automatically select the word under the cursor (or adjacent to it) if no region is activated
    • wrap the region with macros specified according to text or math environment
    • E.g.,

      ./demo/textbf.gif

      ./demo/mathbf.gif

      # -*- mode: snippet -*-
      # name: LaTeX bold
      # type: command
      # binding: s-b
      # --
      (yasp-selected-current)
      (yas-expand-snippet
      (if (region-active-p)
          (if (texmathp)
              "\\mathbf{`yas-selected-text`}$0"
              "\\textbf{`yas-selected-text`}$0"
          )
          (if (texmathp)
              "\\mathbf{$0}"
              "\\textbf{$0}"
          )
      )
      )
              
    • My implementation of fraction:

      ./demo/frac.gif

  • Other snippets: E.g.,

    ./demo/snippets.gif

Configurations:

About

License:MIT License


Languages

Language:YASnippet 100.0%