nvim-surround
nvim-surround copied to clipboard
Visual mode select won't surround
Checklist
- [X] Have you tried updating the plugin to the latest version?
- [X] Have you checked the Breaking Changes issue?
- [X] Have you read through
:h nvim-surround
to see if there might be any relevant information there?
Neovim Version
NVIM v0.9.4
Build type: Release
LuaJIT 2.1.1700008891
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/opt/local/share/nvim"
Run :checkhealth for more info
Plugin Version
Tagged (Stable)
Minimal Configuration
{
'kylechui/nvim-surround',
version = '*',
event = 'VeryLazy',
config = function()
require('nvim-surround').setup({})
end,
},
Sample Buffer
I have a similar issue in Visual mode as well, with this block of text:
Keystroke Sequence
I select it by:
vEE
then
S)
, but it doesn't surround.
Expected behavior
I expect to see:
(cipher.Stream, error)
Actual behavior
No surround.
Additional context
No response
This works fine for me btw
func decryptStream(key string, iv []byte) (cipher.Stream, error) {
}
if my cursor is on the c
in cipher
and I push vEES)
it surrounds
heres my config
-- https://github.com/kylechui/nvim-surround/blob/main/lua/nvim-surround/config.lua
return {
"kylechui/nvim-surround",
version = "*",
event = "InsertEnter",
config = function()
require("nvim-surround").setup()
end,
}
I notice some plugins have problems with passing an empty {}
instead of ()
into setup. I have no idea if thats it but maybe?
I notice some plugins have problems with passing an empty {} instead of () into setup. I have no idea if thats it but maybe?
Shouldn't be an issue; was patched a long long time ago.
Is your base problem that it works after you already add the parentheses (and it adds a second pair), but doesn't in your original image? I'm unable to reproduce your error on my system.
Hmm, has there been known issues in the past where it doesn't play well with other plugins?
Typically plugins like targets.vim
or mini.ai
, but what usually happens is that it causes unintended/unexpected behavior, not no behavior at all.
@kylechui Hm, I am using none of those.
Could it be a keybinding thing?
Ah good question, try verbose xmap S
and see what pops up; you might have a completely different plugin/keymap overriding it.
Aaaaah. I think I see it....
I have this:
https://imgur.com/a/ZhKhnNn
Yeah try remapping either plugin's bindings to avoid conflicts, and that should fix things. Perhaps plugin authors should check for keymaps before setting them (mine included) :thinking:
Feel free to re-open if you are still having issues.