diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-10-11 17:48:42 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-10-11 17:48:42 +0200 |
commit | 0b3dfbfd98b311c6228f75e6d71d917fa9aa3785 (patch) | |
tree | 0a698b1ce8147542ee6930f0066adb0296dbd0d6 /after/ftplugin | |
parent | d7a6755c559c9a5b296bdf65ce67112adef93edb (diff) |
checkpoint
Diffstat (limited to 'after/ftplugin')
-rw-r--r-- | after/ftplugin/c.lua | 2 | ||||
-rw-r--r-- | after/ftplugin/go.lua | 8 | ||||
-rw-r--r-- | after/ftplugin/markdown.lua | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/after/ftplugin/c.lua b/after/ftplugin/c.lua new file mode 100644 index 0000000..f3fcd6f --- /dev/null +++ b/after/ftplugin/c.lua @@ -0,0 +1,2 @@ +local map = vim.keymap.set +map("n", ",p", [[<cmd>s/\(\s*\)\(.\+\)/\1printf("\2: %d\\n", \2);<cr>]], { desc = "Surround var with printf" }) diff --git a/after/ftplugin/go.lua b/after/ftplugin/go.lua new file mode 100644 index 0000000..e17dfea --- /dev/null +++ b/after/ftplugin/go.lua @@ -0,0 +1,8 @@ +local map = vim.keymap.set +map("n", ",p", [[<cmd>s/\(\s*\)\(.\+\)/\1fmt.Printf("\2: %#v\\n", \2)<cr>]], { desc = "Surround var with fmt.Println" }) +map( + "n", + ",e", + [[Iif err := <esc>A; err != nil { +}<esc>Opanic(err)<esc>]] +) diff --git a/after/ftplugin/markdown.lua b/after/ftplugin/markdown.lua index a9c47f3..67bf699 100644 --- a/after/ftplugin/markdown.lua +++ b/after/ftplugin/markdown.lua @@ -1,3 +1,3 @@ -- -- Custom highlight for markdown definitions vim.cmd("hi mdDefs guifg=" .. require("nord.colors").palette.frost.ice) -vim.cmd("match mdDefs /^[[:space:]]*-[a-zA-Z ]\\+:/") +vim.cmd("match mdDefs /^[[:space:]]*-[[:alnum:] ]\\+:/") |