1
0
mirror of https://github.com/amix/vimrc synced 2025-06-30 11:54:59 +08:00

Updated plugins

This commit is contained in:
Amir
2024-01-07 16:14:20 +01:00
parent 86762cf230
commit f676f799e7
172 changed files with 3227 additions and 1204 deletions

View File

@ -21,7 +21,7 @@ def nl(snip):
snip.rv += " "
def getArgs(group):
import re
word = re.compile('[a-zA-Z0-9><.]+ \w+')
word = re.compile(r'[a-zA-Z0-9><.]+ \w+')
return [i.split(" ") for i in word.findall(group) ]
def camel(word):

View File

@ -6,7 +6,7 @@ import vim
# Set g:ultisnips_php_scalar_types to 1 if you'd like to enable PHP 7's scalar types for return values
def isPHPScalarTypesEnabled():
isEnabled = vim.eval("get(g:, 'ultisnips_php_scalar_types', 0)") == "1"
return isEnabled or re.match('<\?php\s+declare\(strict_types=[01]\);', '\n'.join(vim.current.window.buffer))
return isEnabled or re.match(r'<\?php\s+declare\(strict_types=[01]\);', '\n'.join(vim.current.window.buffer))
endglobal
## Snippets from SnipMate, taken from

View File

@ -285,7 +285,7 @@ snippet fnt "Footnote or Citation" i
.. [$1] ${2:Reference}
endsnippet
# Only for Nikola - Static Site Generator
# Only for Nikola Static Site Generator
snippet chart "Pygal chart for Nikola" b
.. chart:: $1`!p snip.rv=complete(t[1], CHART_TYPES)`
:title: '${2:Browser usage evolution (in %)}'

View File

@ -36,24 +36,6 @@ endglobal
# ENVIRONMENT #
###############
snippet beg "begin{} / end{}" bi
\begin{$1}
${0:${VISUAL}}
\end{$1}
endsnippet
snippet cnt "Center" bi
\begin{center}
${0:${VISUAL}}
\end{center}
endsnippet
snippet desc "Description" bi
\begin{description}
\item[${1:${VISUAL}}] $0
\end{description}
endsnippet
snippet lemma "Lemma" bi
\begin{lemma}
${0:${VISUAL}}
@ -135,24 +117,6 @@ snippet fig "Figure environment" bi
\end{figure}
endsnippet
snippet enum "Enumerate" bi
\begin{enumerate}
\item ${0:${VISUAL}}
\end{enumerate}
endsnippet
snippet item "Itemize" bi
\begin{itemize}
\item ${0:${VISUAL}}
\end{itemize}
endsnippet
snippet case "cases" bi
\begin{cases}
${0:${VISUAL}}
\end{cases}
endsnippet
snippet abs "abstract environment" b
\begin{abstract}
${0:${VISUAL}}
@ -247,26 +211,6 @@ snippet srto "... Root" wi
\sqrt[$1]{${2:${VISUAL}}}$0
endsnippet
snippet bf "Bold" wi
\bf{${1:${VISUAL}}}$0
endsnippet
snippet it "Italic" wi
\it{${1:${VISUAL}}}$0
endsnippet
snippet un "Underline" wi
\un{${1:${VISUAL}}}$0
endsnippet
snippet rm "Text" wi
\rm{${1:${VISUAL}}}$0
endsnippet
snippet itm "Item" wi
\item ${0:${VISUAL}}
endsnippet
snippet ceil "Ceil" w
\left\lceil $1 \right\rceil $0
endsnippet
@ -283,34 +227,10 @@ snippet bmat "Bmat" w
\begin{bmatrix} $1 \end{bmatrix} $0
endsnippet
snippet () "Left( right)" w
\left( ${1:${VISUAL}} \right) $0
endsnippet
snippet lr "left( right)" i
\left( ${1:${VISUAL}} \right) $0
endsnippet
snippet lr( "left( right)" i
\left( ${1:${VISUAL}} \right) $0
endsnippet
snippet lr| "left| right|" i
\left| ${1:${VISUAL}} \right| $0
endsnippet
snippet lr{ "left\{ right\}" i
\left\\{ ${1:${VISUAL}} \right\\} $0
endsnippet
snippet lrb "left\{ right\}" i
\left\\{ ${1:${VISUAL}} \right\\} $0
endsnippet
snippet lr[ "left[ right]" i
\left[ ${1:${VISUAL}} \right] $0
endsnippet
snippet lra "leftangle rightangle" wi
\left<${1:${VISUAL}} \right>$0
endsnippet
@ -467,112 +387,4 @@ snippet ac "Acroynm normal" bi
\ac{${1:acronym}}
endsnippet
snippet ni "Non-indented paragraph" bi
\noindent
endsnippet
############
# SECTIONS #
############
snippet chap "Chapter" wi
\chapter{$1${VISUAL}}
endsnippet
snippet sec "Section" wi
\section{$1${VISUAL}}
endsnippet
snippet sec* "Section*" wi
\section*{$1${VISUAL}}
endsnippet
snippet sub "Subsection" wi
\subsection{$1${VISUAL}}
endsnippet
snippet sub* "Subsection*" wi
\subsection*{$1${VISUAL}}
endsnippet
snippet subsub "Subsection" wi
\subsubsection{$1${VISUAL}}
endsnippet
snippet subsub* "Subsubsection" wi
\subsubsection*{$1${VISUAL}}
endsnippet
snippet par "Paragraph" wi
\paragraph{$1${VISUAL}}
endsnippet
snippet par* "Paragraph*" wi
\paragraph*{$1${VISUAL}}
endsnippet
snippet subpar "Sub Paragraph" wi
\subparagraph{$1${VISUAL}}
endsnippet
snippet subpar* "Sub Paragraph*" wi
\subparagraph*{$1${VISUAL}}
endsnippet
snippet chapl "Chapter with label" wi
\chapter{$1${VISUAL}}
\label{cha:${2:${1/\W+/-/g}}}
endsnippet
snippet secl "Section with label" wi
\section{$1${VISUAL}}
\label{sec:${2:${1/\W+/-/g}}}
endsnippet
snippet sec*l "Section* with label" wi
\section*{$1${VISUAL}}
\label{sec:${2:${1/\W+/-/g}}}
endsnippet
snippet subl "Subsection with label" wi
\subsection{$1${VISUAL}}
\label{sub:${2:${1/\W+/-/g}}}
endsnippet
snippet sub*l "Subsection* with label" wi
\subsection*{$1${VISUAL}}
\label{sub:${2:${1/\W+/-/g}}}
endsnippet
snippet subsubl "Subsection with label" wi
\subsubsection{$1${VISUAL}}
\label{ssub:${2:${1/\W+/-/g}}}
endsnippet
snippet subsub*l "Subsubsection with label" wi
\subsubsection*{$1${VISUAL}}
\label{ssub:${2:${1/\W+/-/g}}}
endsnippet
snippet parl "Paragraph with label" wi
\paragraph{$1${VISUAL}}
\label{par:${2:${1/\W+/-/g}}}
endsnippet
snippet par*l "Paragraph* with label" wi
\paragraph*{$1${VISUAL}}
\label{par:${2:${1/\W+/-/g}}}
endsnippet
snippet subparl "Sub Paragraph with label" wi
\subparagraph{$1${VISUAL}}
\label{subp:${2:${1/\W+/-/g}}}
endsnippet
snippet subpar*l "Sub Paragraph* with label" wi
\subparagraph*{$1${VISUAL}}
\label{subp:${2:${1/\W+/-/g}}}
endsnippet
# vim:ft=snippets: