commit 3f4553bdf3dbfe48558e6153fae304a1d8b4e663
parent c58d6e62e8677903ec7c8fd2156e8508ef5bd866
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Mon, 13 Apr 2020 22:34:49 +0200
vim: more snippets
Former-commit-id: 3852a479d5adbfc0cebc9ddb6d95717a5a10af1e
Diffstat:
4 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/vim/ultisnips/markdown.snippets b/vim/ultisnips/markdown.snippets
@@ -42,15 +42,15 @@ snippet format "Pandoc format" b
---
fontsize: 10pt
pagestyle: empty
-bibliography: references.bib
+bibliography: ${1:references.bib}
citation-style: https://raw.githubusercontent.com/citation-style-language/styles/master/ieee.csl
link-citations: true
geometry:
- a4paper
-- left=1in
-- right=1in
-- top=1in
-- bottom=1in
+- left=${2:1in}
+- right=${2:1in}
+- top=${2:1in}
+- bottom=${2:1in}
# For image placement
header-includes:
\usepackage{float}
diff --git a/vim/ultisnips/sh.snippets b/vim/ultisnips/sh.snippets
@@ -1,4 +1,4 @@
-snippet select "Select menu" bA
+snippet select "Select menu" b
select ${1:dest variable} in "${2:Option 1}" "${3:option 2}"; do
case "$$1" in
"$2")
@@ -11,7 +11,7 @@ select ${1:dest variable} in "${2:Option 1}" "${3:option 2}"; do
done
endsnippet
-snippet case "Case statement" bA
+snippet case "Case statement" b
case "$${1:variable}" in
"${2:Option 1}")
;;
@@ -82,7 +82,7 @@ snippet trap "Exit trap" b
trap ${1:cleanup_function} INT TERM EXIT
endsnippet
snippet confirm "Ask for confirmation" b
-read -rp "${1:promp}" -n 1 -s conf
+read -rp "${1:prompt}" -n 1 -s conf
case "$conf" in
Y|y)
${2:# code if yes}
diff --git a/vim/ultisnips/sshconfig.snippets b/vim/ultisnips/sshconfig.snippets
@@ -4,9 +4,9 @@ Host ${1:user-friendly name}
User ${3:username}
Port ${4:22}
IdentityFile ${5:/path/to/key}
- IdentitiesOnly ${6:yes}
- AddKeysToAgent ${7:yes}
- ForwardX11 ${8:yes}
- ProxyJump ${9:other host}
- SendEnv ${10:ENV_VARIABLE_TO_SEND}
+ ${6:IdentitiesOnly yes}
+ ${7:AddKeysToAgent yes}
+ ${8:ForwardX11 yes}
+ ${9:ProxyJump other host}
+ ${10:SendEnv ENV_VARIABLE_TO_SEND}
endsnippet
diff --git a/vim/ultisnips/tex.snippets b/vim/ultisnips/tex.snippets
@@ -25,7 +25,7 @@ def math():
endglobal
# }}}
-# Skeletons {{{
+# Skeletons {{{1
snippet skel "Assignment skeleton" b
\documentclass[12pt,a4paper,oneside,fleqn,notitlepage]{article}
\usepackage{amsmath}
@@ -99,7 +99,7 @@ snippet front "Front matter" b
\title{$1}
\author{$2}
endsnippet
-# }}}
+# }}}1
# Environments {{{
snippet ul "unordered list" b
@@ -121,7 +121,7 @@ snippet - "item in list" b
$2
endsnippet
-snippet beg "begin{} / end{}" bA
+snippet beg "begin{} / end{}" b
\begin{$1}
$0
\end{$1}
@@ -142,7 +142,7 @@ snippet sssec "subsection{}" b
$0
endsnippet
-snippet mk "Inline math" wA
+snippet mk "Inline math" w
$${1}$`!p
if t[2] and t[2][0] not in [',', '.', '?', '-', ' ']:
snip.rv = ' '
@@ -151,7 +151,7 @@ else:
`$2
endsnippet
-snippet dm "Displayed math" wA
+snippet dm "Displayed math" w
\[
$1
\] $0