From 9dbe19f1283ca5088b050f782f54b33269fd4a4a Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sun, 3 Sep 2023 21:06:16 +0300 Subject: nvim: add tex ftplugin with surrounds --- .config/nvim/after/ftplugin/tex.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .config/nvim/after/ftplugin/tex.lua diff --git a/.config/nvim/after/ftplugin/tex.lua b/.config/nvim/after/ftplugin/tex.lua new file mode 100644 index 0000000..2a79358 --- /dev/null +++ b/.config/nvim/after/ftplugin/tex.lua @@ -0,0 +1,24 @@ +require("nvim-surround").buffer_setup({ + surrounds = { + ["B"] = { + add = function() + return { { '\\textbf{' }, { '}' } } + end + }, + ["E"] = { + add = function() + return { { '\\emph{' }, { '}' } } + end + }, + ["T"] = { + add = function() + return { { '\\texttt{' }, { '}' } } + end + }, + ['"'] = { + add = function() + return { { '\\enquote{' }, { '}' } } + end, + }, + } +}) -- cgit v1.2.3-70-g09d2