diff --git a/vim/.vim/own-snippets/asciidoc.snippets b/vim/.vim/own-snippets/asciidoc.snippets index 83a87fa..a643a05 100644 --- a/vim/.vim/own-snippets/asciidoc.snippets +++ b/vim/.vim/own-snippets/asciidoc.snippets @@ -22,11 +22,19 @@ snip.rv = "#" * header_level if legit_header_level else "" $0 endsnippet -snippet tt "Monospace" biw -`$1` $0 +snippet bf "Boldface" iw +**$1** $0 endsnippet -snippet hl "Highlighted text" biw +snippet it "Italic" iw +__$1__ $0 +endsnippet + +snippet tt "Monospace" iw +\`$1\` $0 +endsnippet + +snippet hl "Highlighted text" iw #$1# $0 endsnippet @@ -34,11 +42,11 @@ snippet a "Hyperlink" iw ${1:}[${2:}] $0 endsnippet -snippet sp "Superscript" biw +snippet sp "Superscript" iw ^$1^ $0 endsnippet -snippet sb "Subscript" biw +snippet sb "Subscript" iw ~$1~ $0 endsnippet @@ -88,6 +96,22 @@ $1 $0 endsnippet +snippet "-table h (\d+)-" "Make a quick table with the headers already set up" bir +[cols="`!p snip.rv = match.group(1)`", options="headers"] +|=== +$1 +`!p +number_of_headers = int(match.group(1)) + +for i in range(0, number_of_headers): + snip.rv += f"| Header {i + 1}\n" +` +$2 + +|=== +$0 +endsnippet + # Multimedia blocks snippet figure "Image block with caption" bi .${2:} diff --git a/vim/.vim/own-snippets/tex.snippets b/vim/.vim/own-snippets/tex.snippets index 00b166d..2278c5c 100644 --- a/vim/.vim/own-snippets/tex.snippets +++ b/vim/.vim/own-snippets/tex.snippets @@ -128,7 +128,7 @@ endsnippet # Document structure tags snippet chapter "Chapter element" bi \chapter{$1} -\label{ch!$1} +\label{chap!$1} $0 endsnippet