From 4984a67842e5cc8f07c4c23c00e2ebef4df9d1d4 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Tue, 30 Apr 2024 20:26:58 +0200 Subject: nvim: Add find/delete configuration for nvim-surround --- .config/nvim/after/plugin/surround.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to '.config/nvim') 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 = '^(“ *)().-( *”)()$' }, } } -- cgit v1.2.3