summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYigit Sever2024-09-19 11:41:22 +0200
committerYigit Sever2024-09-19 11:41:22 +0200
commit998b43ae81c8d26962a9521da686452c22c97c4c (patch)
tree852301083e92d0399d6c02ab5b8c2e465966b415
parent3d73c518187aa0a2d4afb7a0359cee670cda1ff6 (diff)
downloaddotfiles-998b43ae81c8d26962a9521da686452c22c97c4c.tar.gz
dotfiles-998b43ae81c8d26962a9521da686452c22c97c4c.tar.bz2
dotfiles-998b43ae81c8d26962a9521da686452c22c97c4c.zip
nvim: enhance surround + latex
add, find, delete & introduce paragraph
-rw-r--r--.config/nvim/after/ftplugin/tex.lua29
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 @@
1require("nvim-surround").buffer_setup({ 1require("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})