Browse Source

snippets (new), Bash functions

- LaTeX: align, piecewise function
- snippets: tabstops, LaTeX environment
- .gitignore
red-hat-laptop
Kevin Mok 7 years ago
parent
commit
8877960762
  1. 1
      .gitignore
  2. 15
      sh.snippets
  3. 10
      snippets.snippets
  4. 20
      texmath.snippets

1
.gitignore

@ -0,0 +1 @@
*.sw*

15
sh.snippets

@ -1,3 +1,14 @@
snippet alias "Custom alias"
alias ${1:name}="${2:command}"
endsnippet
alias ${1:name}="${2:cmd}"
endsnippet
snippet 1lf "One-line function"
${1:name}() { ${2:cmd} ; }
endsnippet
snippet mlf "Multi-line function"
${1:name}() {
${2:cmd}
}
endsnippet

10
snippets.snippets

@ -0,0 +1,10 @@
snippet ts "Tabstop"
${${1:number}:${2:default}}
endsnippet
snippet "b(egin)?" "begin{} / end{}" br
\begin{${1:something}}
${0:${VISUAL}}
\end{$1}
endsnippet

20
texmath.snippets

@ -1,7 +1,15 @@
snippet eqs "Equation with split" b
\begin{equation*}
\begin{split}
$0
\end{split}
\end{equation*}
snippet al "Align (math)" b
\begin{align*}
$0
\end{align*}
endsnippet
snippet pwf "Piecewise function" b
\[
${1:name} = \left.
\begin{cases}
${2:equation}, & ${3:condition} \\\\
\end{cases}
\right\\}
\]
endsnippet
Loading…
Cancel
Save