summaryrefslogtreecommitdiff
path: root/.config/nvim
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-04-30 20:26:58 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-04-30 20:26:58 +0200
commit4984a67842e5cc8f07c4c23c00e2ebef4df9d1d4 (patch)
treec5a61fbb5e6414c0389ffd183aa254a92d7dcf48 /.config/nvim
parentadcca44953a957d1cb760e2b2aca3d1f3525035a (diff)
nvim: Add find/delete configuration for nvim-surround
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/after/plugin/surround.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/.config/nvim/after/plugin/surround.lua b/.config/nvim/after/plugin/surround.lua
index 859f984..605b1eb 100644
--- a/.config/nvim/after/plugin/surround.lua
+++ b/.config/nvim/after/plugin/surround.lua
@@ -2,18 +2,26 @@ require('nvim-surround').setup {
surrounds = {
['’'] = {
add = { '‘', '’' },
+ find = '‘[^‘’]*’',
+ delete = '^(‘)().-(’)()$'
},
['‘'] = {
add = { '‘ ', ' ’' },
+ find = '‘[^‘’]*’',
+ delete = '^(‘ *)().-( *’)()$'
},
['”'] = {
add = { '“', '”' },
+ find = '“[^“”]*”',
+ delete = '^(“)().-(”)()$'
},
['“'] = {
add = { '“ ', ' ”' },
+ find = '“[^“”]*”',
+ delete = '^(“ *)().-( *”)()$'
},
}
}