Closed Fau818 closed 1 year ago
:h nvim-surround
NVIM v0.8.0
Nightly (Beta)
The following is my configuration.
local status_ok, surround = pcall(require, "nvim-surround") if not status_ok then return end local config = { keymaps = { insert = false, insert_line = false, normal = "s", normal_cur = "ss", normal_line = "SSSSSSSSSSSSSSS", -- false, normal_cur_line = "S", visual = "s", visual_line = "S", delete = "ds", change = "cs", }, } surround.setup(config)
"hello "world""
The cursor should in the world word. Then, change the surrounding " to '.
world
"
'
"hello "world"" -> "hello 'world'"
"hello 'world'"
'hello 'world""
As shown in the video, the plugin has highlighted the correct pair of quotes, but it changed another pair.
https://user-images.githubusercontent.com/75115028/202343999-b2caf8e8-c215-4f35-af6f-b44c8f2a104b.mov
The latest commit should fix this issue, thanks for reporting and feel free to re-open if necessary!
Checklist
:h nvim-surround
to see if there might be any relevant information there?Neovim Version
NVIM v0.8.0
Plugin Version
Nightly (Beta)
Minimal Configuration
The following is my configuration.
Sample Buffer
"hello "world""
Keystroke Sequence
The cursor should in the
world
word. Then, change the surrounding"
to'
.Expected behavior
"hello "world""
->"hello 'world'"
Actual behavior
'hello 'world""
Additional context
As shown in the video, the plugin has highlighted the correct pair of quotes, but it changed another pair.
https://user-images.githubusercontent.com/75115028/202343999-b2caf8e8-c215-4f35-af6f-b44c8f2a104b.mov