mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -77,7 +77,7 @@ endsnippet
|
||||
# DATES #
|
||||
#########
|
||||
snippet date "YYYY-MM-DD" w
|
||||
`!v strftime("%F")`
|
||||
`!v strftime("%Y-%m-%d")`
|
||||
endsnippet
|
||||
|
||||
snippet ddate "Month DD, YYYY" w
|
||||
@ -85,7 +85,7 @@ snippet ddate "Month DD, YYYY" w
|
||||
endsnippet
|
||||
|
||||
snippet diso "ISO format datetime" w
|
||||
`!v strftime("%F %H:%M:%S%z")`
|
||||
`!v strftime("%Y-%m-%d %H:%M:%S%z")`
|
||||
endsnippet
|
||||
|
||||
snippet time "hh:mm" w
|
||||
|
@ -26,7 +26,7 @@ endglobal
|
||||
# TextMate Snippets #
|
||||
###########################################################################
|
||||
snippet get "Get Elements"
|
||||
getElement${1/(T)|.*/(?1:s)/}By${1:T}${1/(T)|(I)|.*/(?1:agName)(?2:d)/}('$2')
|
||||
getElement${1/(T)|(C)|.*/(?1:s)(?2:s)/}By${1:T}${1/(T)|(I)|(C).*/(?1:agName)(?2:d)(?3:lassName)/}('$2')
|
||||
endsnippet
|
||||
|
||||
snippet '':f "object method string"
|
||||
@ -68,7 +68,7 @@ ${1:var }${2:function_name} = function $2`!p snip.rv = space_before_function_par
|
||||
}`!p snip.rv = semi(snip)`
|
||||
endsnippet
|
||||
|
||||
snippet af "Anonymous Function" i
|
||||
snippet anf "Anonymous Function" i
|
||||
function`!p snip.rv = space_before_function_paren(snip)`($1) {
|
||||
${VISUAL}$0
|
||||
}
|
||||
|
@ -126,63 +126,75 @@ snippet cha "Chapter" b
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet sec "Section" b
|
||||
\section{${1:section name}}%
|
||||
snippet sec "Section"
|
||||
\section{${1:${VISUAL:section name}}}%
|
||||
\label{sec:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
|
||||
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet sec* "Section" b
|
||||
\section*{${1:section name}}%
|
||||
snippet sec* "Section"
|
||||
\section*{${1:${VISUAL:section name}}}%
|
||||
\label{sec:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
|
||||
|
||||
${0}
|
||||
endsnippet
|
||||
|
||||
|
||||
snippet sub "Subsection" b
|
||||
\subsection{${1:subsection name}}%
|
||||
snippet sub "Subsection"
|
||||
\subsection{${1:${VISUAL:subsection name}}}%
|
||||
\label{sub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
|
||||
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet sub* "Subsection" b
|
||||
\subsection*{${1:subsection name}}%
|
||||
snippet sub* "Subsection"
|
||||
\subsection*{${1:${VISUAL:subsection name}}}%
|
||||
\label{sub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
|
||||
|
||||
${0}
|
||||
endsnippet
|
||||
|
||||
snippet ssub "Subsubsection" b
|
||||
\subsubsection{${1:subsubsection name}}%
|
||||
snippet ssub "Subsubsection"
|
||||
\subsubsection{${1:${VISUAL:subsubsection name}}}%
|
||||
\label{ssub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
|
||||
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet ssub* "Subsubsection" b
|
||||
\subsubsection*{${1:subsubsection name}}%
|
||||
snippet ssub* "Subsubsection"
|
||||
\subsubsection*{${1:${VISUAL:subsubsection name}}}%
|
||||
\label{ssub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
|
||||
|
||||
${0}
|
||||
endsnippet
|
||||
|
||||
snippet par "Paragraph" b
|
||||
\paragraph{${1:paragraph name}}%
|
||||
snippet par "Paragraph"
|
||||
\paragraph{${1:${VISUAL:paragraph name}}}%
|
||||
\label{par:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
|
||||
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet subp "Subparagraph" b
|
||||
\subparagraph{${1:subparagraph name}}%
|
||||
snippet subp "Subparagraph"
|
||||
\subparagraph{${1:${VISUAL:subparagraph name}}}%
|
||||
\label{par:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
|
||||
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet ac "Acroynm normal" b
|
||||
\ac{${1:acronym}}
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet acl "Acroynm expanded" b
|
||||
\acl{${1:acronym}}
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
|
||||
|
||||
snippet ni "Non-indented paragraph" b
|
||||
\noindent
|
||||
$0
|
||||
@ -197,9 +209,15 @@ snippet lp "Long parenthesis"
|
||||
endsnippet
|
||||
|
||||
snippet "mint(ed)?( (\S+))?" "Minted code typeset" br
|
||||
\begin{minted}{${1:`!p
|
||||
\begin{listing}
|
||||
\begin{minted}[linenos,numbersep=5pt,frame=lines,framesep=2mm]{${1:`!p
|
||||
snip.rv = match.group(3) if match.group(2) is not None else "language"`}}
|
||||
${2:${VISUAL:code}}
|
||||
\end{minted}$0
|
||||
\end{minted}
|
||||
\caption{${3:caption name}}
|
||||
\label{lst:${4:${3/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
|
||||
\end{listing}
|
||||
|
||||
$0
|
||||
endsnippet
|
||||
# vim:ft=snippets:
|
||||
|
@ -3,6 +3,7 @@ priority -50
|
||||
##############
|
||||
# MATH STUFF #
|
||||
##############
|
||||
|
||||
snippet eq "Equation" b
|
||||
\begin{equation}
|
||||
$0
|
||||
@ -15,6 +16,18 @@ snippet eqnn "Equation without number" b
|
||||
\end{equation*}
|
||||
endsnippet
|
||||
|
||||
snippet al "Align" b
|
||||
\begin{align}
|
||||
$0
|
||||
\end{align}
|
||||
endsnippet
|
||||
|
||||
snippet alnn "Align without numbers" b
|
||||
\begin{align*}
|
||||
$0
|
||||
\end{align*}
|
||||
endsnippet
|
||||
|
||||
snippet eqa "Equation array" b
|
||||
\begin{eqnarray}
|
||||
$1 & $2 & $0
|
||||
@ -25,10 +38,10 @@ snippet eqann "Equation array without numbers" b
|
||||
\begin{eqnarray*}
|
||||
$1 & $2 & $0
|
||||
\end{eqnarray*}
|
||||
|
||||
endsnippet
|
||||
|
||||
snippet frac "Fraction" w
|
||||
\frac{${1:${VISUAL:nom}}}{${2:denom}}
|
||||
\frac{${1:${VISUAL}}}{${2}}
|
||||
endsnippet
|
||||
|
||||
snippet mat "Smart Matrix"
|
||||
@ -53,4 +66,20 @@ snippet lr[ "left[ right]" w
|
||||
\left[ ${1:${VISUAL}} \right]
|
||||
endsnippet
|
||||
|
||||
#################
|
||||
# PHYSICS STUFF #
|
||||
#################
|
||||
|
||||
snippet dv "Derivative" w
|
||||
\dv[${1:${VISUAL}}]{${2}}{${3}}
|
||||
endsnippet
|
||||
|
||||
snippet pdv "Partial Derivative" w
|
||||
\pdv[${1:${VISUAL}}]{${2}}{${3}}
|
||||
endsnippet
|
||||
|
||||
snippet SI "SI-Unit" w
|
||||
\SI{${1:${VISUAL}}}{${2}}
|
||||
endsnippet
|
||||
|
||||
# vim:ft=snippets:
|
||||
|
Reference in New Issue
Block a user