From 2501cac13adf950cd1887baac0674d6458a346b0 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 23 Apr 2023 22:05:49 +0900 Subject: [PATCH] Add some UltiSnips snippets to help with Markdown posts and some macron abbreviations for Tokyo and Kyoto --- .nvim/UltiSnips/markdown.snippets | 15 +++++++++++++++ .nvim/after/ftplugin/markdown.lua | 10 ++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .nvim/UltiSnips/markdown.snippets create mode 100644 .nvim/after/ftplugin/markdown.lua diff --git a/.nvim/UltiSnips/markdown.snippets b/.nvim/UltiSnips/markdown.snippets new file mode 100644 index 0000000..9edc36e --- /dev/null +++ b/.nvim/UltiSnips/markdown.snippets @@ -0,0 +1,15 @@ +snippet jp "lang jp shortcode" w +{{< lang jp >}}$1{{< /lang >}} +endsnippet + +snippet jpp "lang jp shortcode with expansion" w +{{% lang jp %}}$1{{% /lang %}} +endsnippet + +snippet tess "tess shortcode" w +{{< tess >}} +endsnippet + +snippet ruby "ruby shortcode" w +{{< ruby "$1" >}}$2{{< /ruby >}} +endsnippet diff --git a/.nvim/after/ftplugin/markdown.lua b/.nvim/after/ftplugin/markdown.lua new file mode 100644 index 0000000..b03a874 --- /dev/null +++ b/.nvim/after/ftplugin/markdown.lua @@ -0,0 +1,10 @@ +-- Eryn Wells + +vim.bo.textwidth = 80 + +vim.cmd [[ + iabbrev tokyo Tōkyō + iabbrev Tokyo Tōkyō + iabbrev kyoto Kyōto + iabbrev Kyoto Kyōto +]]