4 ms·
Viper mode is terrible though. Half the things I am used to in proper Vim do not work correctly in Viper mode. I don't remember those annoyances anymore but som
by distcs 4y ago
Viper mode is terrible though. Half the things I am used to in proper Vim do not work correctly in Viper mode. I don't remember those annoyances anymore but someone who has recently tried viper mode may be able to share the details.
(Edit: Turns out I do remember some of the annoyances. See the grandchild comment below where I have noted some examples.)
I found Evil mode is so much better at emulating Vim than viper mode.
- jrootabega 4y agoviper is just a vi layer, not vim, as far as I know. Being able to have basic vi movement and operators is where most of the value in vi[m] layers comes from, IMO, and I haven't yet found any problems there. The most recent bug I've been aware of in viper (not that I am any authority here) was when the Emacs maintainers broke basic Emacs alt/meta key sequences when viper was active, and that happened because they just weren't thinking/caring about viper, which is the reason I spoke up here in the first place - people don't really think about it and it gets neglected. It's a vicious cycle.
- distcs 4y agoSo I fired up Emacs: emacs -q M-x viper-mode RET Chose expert level 1 for beginners so that it is closest to Vi behavior. (Recommended level is at least 3 but that does not make a difference for what I am about to explain.) C-x C-f foo.txt RET i hello world RET hello world RET hello world RET ESC Looking good so far. gg Does nothing!! Okay no problem. Let me try: :0 RET Good. I am back to the top line. V Instead of starting visual line mode, it brings up find file minibuffer. So that's 2 problems already from 2 minutes of using Viper. I have to admit though that I come from Vim (not Vi) so maybe my expectations are not fair for Viper. Is gg a Vi command or Vim? I can't remember. But I expect these basic things to work. It is this kind of stuff that used to trip me up often that I discontinued Viper and went with Evil. BTW this list of annoyances in Viper keeps going on and on. - dab, da(, di(, dib, etc. don't delete a block. - gqq, gqgq, etc. don't reformat paragraphs. - * does not search for the current word - and so on and so on Maybe I am being unfair to Viper but I guess you can see why in 2023, a Vim user might want to skip Viper completely and go straight to Evil.
- aidenn0 4y agoI know that either G or gg was added in vim, but I don't remember which.
- jrootabega 4y agoYes, gg and v/V appear to be vim-only commands. One vi counterpart to gg is 1G. Visual mode is a vim-only concept, I believe. The rest of them, I would bet are vim-only. Yes, I can see why, if you require all of these vim features, viper would not be good for you. "Viper mode is terrible though." was not a good way to express this. The title of the thread, and the name of the package (incorrectly) state that it is a vi layer, so it's natural to mention the vi layer that's built into Emacs. It's definitely something that people should remain aware of and still provides value. IMO, Emacs + viper is significantly better than just Emacs, so it's worth knowing about. Comparing its vi functionality against vim is definitely good, but it being forgotten and neglected is not.
- jrootabega 4y agoI should add that I would love to see viper mode enhanced to (perhaps optionally) support some vim functionality, and I admit I would find it silly if someone said that viper should only ever support strict vi functionality. But I would also be sad if people used the existence of Evil as a reason to declare viper dead.
- distcs 4y ago> "Viper mode is terrible though." was not a good way to express this. Agreed and thanks for calling it out. Will be more careful next time.
- aidenn0 4y agoIt is impossible for me to switch between vim and viper. My hands will just start doing a text manipulation that doesn't work in whichever I'm currently using, and it breaks my flow. Prior to evil-mode, when I used emacs for something, I used it without viper because at least then it was so very different that it didn't trick my subconscious into doing something that wouldn't work. With a few tweaks to my config, I never have that problem with evil.
- distcs 4y ago> "It sucks, but I can't substantiate that" is not really good discussion. Agreed! Fixed that. See sibling comment of mine.
- jrootabega 4y agoadjusted mine as well