1
0
mirror of https://github.com/amix/vimrc synced 2025-06-17 10:55:00 +08:00

Updated plugins

This commit is contained in:
Amir
2020-12-04 22:15:32 +01:00
parent e83f5ea2e7
commit a06964dd3b
261 changed files with 6955 additions and 2773 deletions

View File

@ -9,15 +9,15 @@ def create_table(snip):
cols = snip.buffer[snip.line].split('x')[1]
int_val = lambda string: int(''.join(s for s in string if s.isdigit()))
rows = int_val(rows)
cols = int_val(cols)
offset = cols + 1
old_spacing = snip.buffer[snip.line][:snip.buffer[snip.line].rfind('\t') + 1]
snip.buffer[snip.line] = ''
final_str = old_spacing + "\\begin{tabular}{|" + "|".join(['$' + str(i + 1) for i in range(cols)]) + "|}\n"
for i in range(rows):
@ -35,7 +35,7 @@ def add_row(snip):
old_spacing = snip.buffer[snip.line][:snip.buffer[snip.line].rfind('\t') + 1]
snip.buffer[snip.line] = ''
final_str = old_spacing
final_str += " & ".join(['$' + str(j + 1) for j in range(row_len)])
final_str += " \\\\\\"
@ -63,7 +63,7 @@ $0${2/(?<=.)(c|l|r)|./(?1: & )/g}
endsnippet
pre_expand "create_table(snip)"
snippet "gentbl(\d+)x(\d+)" "Generate table of *width* by *height*" r
snippet "gentbl(\d+)x(\d+)" "Generate table of *width* by *height*" r
endsnippet
pre_expand "add_row(snip)"
@ -193,8 +193,6 @@ snippet acl "Acroynm expanded" b
$0
endsnippet
snippet ni "Non-indented paragraph" b
\noindent
$0
@ -241,4 +239,20 @@ snippet glnl "New long glossary item" b
${0:description}
}
endsnippet
# Bold text
snippet bf "Bold"
\textbf{$1} $0
endsnippet
# Italic text
snippet ita "Italics"
\textit{$1} $0
endsnippet
# Underlined text
snippet und "Underline"
\underline{$1} $0
endsnippet
# vim:ft=snippets: