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

s in Visual mode works differently from Vim #9467

Closed
dniku opened this issue Aug 19, 2017 · 2 comments
Closed

s in Visual mode works differently from Vim #9467

dniku opened this issue Aug 19, 2017 · 2 comments

Comments

@dniku
Copy link

dniku commented Aug 19, 2017

Description :octocat:

s in Visual mode works differently from Vim.

Reproduction guide 🪲

  • Start Emacs
  • Open any buffer
  • Type some words, like type some words
  • Place your cursor at the beginning of some word, like some
  • Press ves

Observed behaviour: 👀 💔
Status bar says s-; the selection remains in place. Typing another character surrounds the selection with that character.

Expected behaviour: ❤️ 😄
The selected word should be removed and the mode should be switched to Insert, like in Vim. In Spacemacs, this can be achieved with the c command instead of s.

System Info 💻

  • OS: gnu/linux
  • Emacs: 24.5.1
  • Spacemacs: 0.200.9
  • Spacemacs branch: master (rev. 8e1af14)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(purescript
 (haskell :variables haskell-enable-hindent-style "fundamental")
 yaml helm auto-completion
 (haskell :variables haskell-completion-backend 'company-ghci)
 emacs-lisp git markdown org)

I admit that surrounding the selection with a character might be something someone would need, and c and s are (completely?) equivalent in Visual mode. However, muscle memory from Vim is still there, and it's inconvenient that the defaults are different.

@bmag
Copy link
Collaborator

bmag commented Aug 19, 2017

We use evil-surround, which mimics Vim's surround plugin. It does work differently than vanilla Vim, but that's intentional. You can try excluding the evil-surround package and see what happens.

@duianto
Copy link
Collaborator

duianto commented Aug 19, 2017

This seems to be why it was decided to use s for surround:
emacs-evil/evil-surround#48 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants