kylechui / nvim-surround

Add/change/delete surrounding delimiter pairs with ease. Written with :heart: in Lua.
MIT License
2.98k stars 60 forks source link

Commands not working #198

Closed angelollima closed 1 year ago

angelollima commented 1 year ago

Checklist

Neovim Version

NVIM v0.8.2

Plugin Version

Tagged (Stable)

Minimal Configuration

use({
    "kylechui/nvim-surround",
    tag = "*", -- Use for stability; omit to use `main` branch for the latest features
    config = function()
      require("nvim-surround").setup({
        -- Configuration here, or leave empty to use defaults
      })
    end
  })

Sample Buffer

image

Keystroke Sequence

:ysiw)

Expected behavior

"kylechui/nvim-surround"

command: ysiw)

expected: ("kylechui/nvim-surround")

Actual behavior

nothing happens and then i receive the message Error "Not an editor command"

Additional context

I saw the issue https://github.com/kylechui/nvim-surround/issues/193#issue-1515083889 but i believe that there's no problem on root cause i tested others plugins after i try this one and it works well!

kylechui commented 1 year ago

That is because ys is not an editor command defined by nvim-surround. It is a normal mode keymap, i.e. type ysiw) in normal mode, not in command mode.

angelollima commented 1 year ago

i'm so sorry for that. I got completely confused. works pretty well