From bd189488efd3121236f3d6425dd9dcebbf28837e Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Sat, 28 Aug 2021 22:41:07 +0200 Subject: [PATCH] Feat: add my snippets --- nvim/.config/nvim/vsnips/rst.json | 20 ++++++++++++++++++++ nvim/.config/nvim/vsnips/tex.json | 31 +++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 nvim/.config/nvim/vsnips/rst.json create mode 100644 nvim/.config/nvim/vsnips/tex.json diff --git a/nvim/.config/nvim/vsnips/rst.json b/nvim/.config/nvim/vsnips/rst.json new file mode 100644 index 0000000..4584942 --- /dev/null +++ b/nvim/.config/nvim/vsnips/rst.json @@ -0,0 +1,20 @@ +{ + "image": { + "prefix": "image", + "body": [ + ".. image:: $1", + "\t:height: 200px", + "\t:alt: $2", + "$0" + ], + "description": "Insert image" + }, + "etape": { + "prefix": ["etape", "étape"], + "body": [ + "Étape ${1:1}: $2", + "$0" + ], + "description": "Insert image" + } +} diff --git a/nvim/.config/nvim/vsnips/tex.json b/nvim/.config/nvim/vsnips/tex.json new file mode 100644 index 0000000..90243db --- /dev/null +++ b/nvim/.config/nvim/vsnips/tex.json @@ -0,0 +1,31 @@ +{ + "tabular": { + "prefix": "tabular", + "body": [ + "\\\\begin{tabular}{$1}", + "\\\\hline", + "\t$0", + "\\\\hline", + "\\\\end{tabular}" + ], + "description": "tabular" + }, + "center": { + "prefix": "center", + "body": [ + "\\\\begin{center}", + "\t$0", + "\\\\end{center}" + ], + "description": "center" + }, + "minipage": { + "prefix": "minipage", + "body": [ + "\\\\begin{minipage}{${1:0.5}${2:\\\\linewidth}}", + "\t$0", + "\\\\end{minipage}" + ], + "description": "minipage" + } +}