Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surround not working #8

Closed
mskar opened this issue Feb 1, 2021 · 9 comments
Closed

Surround not working #8

mskar opened this issue Feb 1, 2021 · 9 comments
Assignees
Labels
bug Something isn't working verified This issue was already verified

Comments

@mskar
Copy link

mskar commented Feb 1, 2021

I cloned and sourced the plugin:

git clone https://github.com/jeffreytse/zsh-vi-mode.git $HOME/.zsh-vi-mode
source $HOME/.zsh-vi-mode/zsh-vi-mode.plugin.zsh

Incrementation/decrementation works (<C-a>/<C-x>), but surround (e.g. yse") doesn't.
I tried it with visual selection and with motions. Am I doing something wrong?

@mskar
Copy link
Author

mskar commented Feb 1, 2021

Ok, S" works to surround with " in visual mode, but ds, cs, and ys don't work for me.
It may be something in my config is conflicting with the plugin.

@jeffreytse
Copy link
Owner

Hi @mskar

I think you can utilize the method of exclusion (i.e. comment some lines) to check which part caused the confliction. Any issue welcome to commit here, I will try to help you figure it out.

Thanks and regards

@jeffreytse jeffreytse self-assigned this Feb 2, 2021
@jeffreytse jeffreytse added the question Further information is requested label Feb 2, 2021
@mskar
Copy link
Author

mskar commented Feb 2, 2021

Thanks, I will experiment with commenting out lines and then report back here.

@mskar
Copy link
Author

mskar commented Feb 17, 2021

I tried this other plugin: https://github.com/softmoth/zsh-vim-mode
and the surround functionality doesn't really work for me there either, so it's definitely a problem with my config😄

@kyazdani42
Copy link

Hi, i don't think it's a problem with your config. I've noticed cs" doesn't work even if only zsh_vi_mode is enabled.
you can reproduce easily with a="some string" and trying to cs"' inside the string doesn't work. Not sure why this is happening, it works fine when replacing '.
Although for brackets, it does work partially: with a=(echo 1), you got to slowly do the cs)] command to get it working, if you do it too fast, it will delete a character.

@jeffreytse
Copy link
Owner

Hi @kyazdani42

Thanks for your details, I have reproduced the issue and I will fix this problem as soon as possible.

Thanks and regards

@jeffreytse jeffreytse added bug Something isn't working and removed question Further information is requested labels Feb 21, 2021
jeffreytse added a commit that referenced this issue Feb 21, 2021
This commit has fixed the issue that you change double quotes " but
not working, such as `cs"` or `S"`.
@jeffreytse
Copy link
Owner

Hi @kyazdani42 @mskar

Thanks for your details on the surround issue. And now this issue about changing surround by cs" or S" has been fixed. Welcome to update your plugin to the latest version.

Thanks and regards

@jeffreytse jeffreytse added the verified This issue was already verified label Mar 4, 2021
jeffreytse referenced this issue in roosta/etc Mar 11, 2021
Issue where various keybindings are overridden when using zsh-vi-mode,
possible to fix, will look at later
@roosta
Copy link

roosta commented Mar 11, 2021

Hi all, I was about to post a comment about this not working for me even after the patch, but I got it working properly by removing this environment variable: KEYTIMEOUT. I had it set to 1, which resulted in change surround not working properly. Hope this can be helpful in some way.

@eyev0
Copy link

eyev0 commented May 7, 2024

Hi all, I was about to post a comment about this not working for me even after the patch, but I got it working properly by removing this environment variable: KEYTIMEOUT. I had it set to 1, which resulted in change surround not working properly. Hope this can be helpful in some way.

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working verified This issue was already verified
Projects
None yet
Development

No branches or pull requests

5 participants