require("nvim-surround").buffer_setup({ surrounds = { ["K"] = { add = { "\\textbf{", "}" }, find = "\\textbf%b{}", delete = "^(\\textbf{)().-(})()$", }, ["E"] = { add = { "\\emph{", "}" }, find = "\\emph%b{}", delete = "^(\\emph{)().-(})()$", }, ["T"] = { add = { "\\texttt{", "}" }, find = "\\texttt%b{}", delete = "^(\\texttt{)().-(})()$", }, ['"'] = { add = { "\\enquote{", "}" }, find = "\\enquote%b{}", delete = "^(\\enquote{)().-(})()$", }, ['P'] = { add = { "\\paragraph{", "}" }, find = "\\paragraph%b{}", delete = "^(\\paragraph{)().-(})()$", }, } })