diff options
Diffstat (limited to '.config/nvim/after/ftplugin')
-rw-r--r-- | .config/nvim/after/ftplugin/tex.lua | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/.config/nvim/after/ftplugin/tex.lua b/.config/nvim/after/ftplugin/tex.lua index 2576d55..2cd03a7 100644 --- a/.config/nvim/after/ftplugin/tex.lua +++ b/.config/nvim/after/ftplugin/tex.lua | |||
@@ -1,24 +1,29 @@ | |||
1 | require("nvim-surround").buffer_setup({ | 1 | require("nvim-surround").buffer_setup({ |
2 | surrounds = { | 2 | surrounds = { |
3 | ["K"] = { | 3 | ["K"] = { |
4 | add = function() | 4 | add = { "\\textbf{", "}" }, |
5 | return { { '\\textbf{' }, { '}' } } | 5 | find = "\\textbf%b{}", |
6 | end | 6 | delete = "^(\\textbf{)().-(})()$", |
7 | }, | 7 | }, |
8 | ["E"] = { | 8 | ["E"] = { |
9 | add = function() | 9 | add = { "\\emph{", "}" }, |
10 | return { { '\\emph{' }, { '}' } } | 10 | find = "\\emph%b{}", |
11 | end | 11 | delete = "^(\\emph{)().-(})()$", |
12 | }, | 12 | }, |
13 | ["T"] = { | 13 | ["T"] = { |
14 | add = function() | 14 | add = { "\\texttt{", "}" }, |
15 | return { { '\\texttt{' }, { '}' } } | 15 | find = "\\texttt%b{}", |
16 | end | 16 | delete = "^(\\texttt{)().-(})()$", |
17 | }, | 17 | }, |
18 | ['"'] = { | 18 | ['"'] = { |
19 | add = function() | 19 | add = { "\\enquote{", "}" }, |
20 | return { { '\\enquote{' }, { '}' } } | 20 | find = "\\enquote%b{}", |
21 | end, | 21 | delete = "^(\\enquote{)().-(})()$", |
22 | }, | ||
23 | ['P'] = { | ||
24 | add = { "\\paragraph{", "}" }, | ||
25 | find = "\\paragraph%b{}", | ||
26 | delete = "^(\\paragraph{)().-(})()$", | ||
22 | }, | 27 | }, |
23 | } | 28 | } |
24 | }) | 29 | }) |