summaryrefslogtreecommitdiffstats
path: root/.config/nvim/after/ftplugin/tex.lua
blob: 2cd03a7156354bbed414f2a47a7fc435a71c9c43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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{)().-(})()$",
        },
    }
})