Hacker News new | past | comments | ask | show | jobs | submit login
Why, oh WHY, do those #? nutheads use vi? (viemu.com)
38 points by jxub on Dec 2, 2018 | hide | past | favorite | 23 comments



Because its the only reliable way to edit a file when there’s a “house on fire” production incident.

Want to use xemacs? sorry you need a weird dependency. Ok lets use emacs. Still not installed. Ok lets use nano... wait how do i save this again?


Ctrl+o, it's literally on the screen at all times. People that use vi, and not vim, use it, as my very limited experience with knowing one person doing it, is because vi is available everywhere AND is more powerful than nano. And since they have to rely on vi, they might as well learn it fully.


Can you imagine people use vi because they like the way it works? I do. The fact that it is available everywhere is a nice bonus.


I have mg installed everywhere.


I have always had a problem with all these emacs or vim plugins for various editors and IDEs. The problem is that as soon as you leave the context they work in - switch to a different window or a dialog box (or, in the case of Visual Studio, anywhere outside the code editor window), you are back to having to use the native key bindings.


I had the same issues. I really liked vim for editing scripts but wanted more functionality as I was studying datascience and needed to work on Jupyter notebooks and RMarkdown files. Luckily someone showed me spacemacs which is an emacs distribution built on emulating the vim experience but with all of the power of emacs.

http://spacemacs.org/

Definitely worth checking out.


IntelliJ does this quite well with IdeaVim IMO.

Even the quick definition window (to look at a method's implementation) supports it even though you can not edit the code there. Still useful for navigating.

Not all plugins are good - but I am already happy if they support basic functionality rather tham having to miss all functionality.


Favourite vi joke ever: "I've been using it for about two years now, mostly because I can't figure out how to exit it."

On the other hand, it's everywhere, it's quick and once you learn it there's a lot of muscle memory that takes over.


I always enjoyed, "Need to generate a pseudo-random key sequence quickly? Open up vim and ask a friend to close it for you."


What really makes coding environment productive for me are: file navigation, code browsing, call hierarchy, class hierarchy, find usages, find declaration, find implementations, refactoring, build integration, debugger integration, documentation integration.

I did try vim more than once over the years. I'd use it to edit config files on servers but would much prefer an IDE for coding.


You can use VIM style keybindings in an IDE. I have been using VsVim in Visual Studio for years, it's great!


I'd like to stress the point in the article about how important the . is to efficient vim use. https://pragprog.com/book/dnvim2/practical-vim-second-editio... completely changed how I use vi in this respect.


vim is a grammar, a true grammar, once you learn that, it all makes sense.

http://rc3.org/2012/05/12/the-grammar-of-vim/


'Learn emacs instead'

I would say emacs can be a lot more complex than vim, I mean people use it as basically an OS.


First of all the article is from (2007).

This is just another love letter to vi/vim that lists "misconceptions" people tend to have and tries to debunk them.

Me personally, I didn't have any of the misconceptions listed in there. My beef with vi/vim lies somewhere else. So let's tackle the question "Why, oh WHY, do those #?@! nutheads use vi?" and here is my top list of problems I have with vi(m)

1) most people I know don't know how to use vi(m)

I know quite a lot of people who use it, but those people don't use any advanced functionality. They basically use it like this

  i
  <do stuff>
  <esc>
  :wq
some of those people recommend vim to other people and when asked why they use it all argue with how powerful it is and that it is installed "everywhere", but nobody uses the powerful functionality (anecdotally it's less then 10%)

2) vi is installed by default everywhere - but what vi?

There is

* nvi (used in void linux in version 1.81) https://sites.google.com/a/bostic.com/keithbostic/vi/

* ex-vi (used in archlinux) http://ex-vi.sourceforge.net/

* vim-minimal (used in red hat) http://www.vim.org/

* vim (yeah ubuntu uses afaik "vim.basic") http://www.vim.org/

Then there are busybox vi, neatvi and neovim (that's what I use)

Anyway they all "should" behave the same, but they have non overlapping functionality and behave different (even depending on the terminal you use. I more then once had problems depending on the TERM variable set)

3) you probably have to carry over you config wherever you go

Let's be real here. If you use vi(m), _really_ use vim, you probably have your default config. Maybe on github, maybe on your homepage, maybe on an usb drive or memorized. I know people with multiple vim configs for different use cases. The defaults I find are not usable for most. And some functionality doesn't carry over from vim to vi.

And even thought I say that the defaults suck, the default behavior changes from version to version. For example the smart indent functionality on older versions is different than it is now and they changed the crypto for the encryption (imho vim shouldn't support encrypting of documents anyway [see point 5] these were just the 2 examples that came to mind first). Meeh

4) you have to use plugins

Yeah plugins are great. You don't have to use plugins, but you for sure _want_ to use plugins. With the right plugins vim can even be a really good IDE. But you have to manage them, update them and again: on every machine you use you have to carry it over.

What plugin manager do you use? vim-plug? vundle? pathogen? Or maybe something entirely different? You don't want to manage them by hand and you are gonna need one. So get comfortable choosing one and setting it up everywhere.

5) vims original goal (afaik) was to adhere to the kiss principal

but it failed. vim now has the kitchen sink. If you install vim you pull in more than 30mb (yeah today it doesn't seem like much, but I like having a small footprint no matter what I do)

If you can read mails in your editor you are doing it wrong (sorry emacs users)

_____________________________

So the reasons why I don't like vim or why people shouldn't use vim aren't the ones listed on the site.

PS maybe you want to take a look at vis if you want to see what vim should have been.

edit. formatting


I don’t understand that your first problem with vim is that other people don’t know how to use it. That’s like me saying I don’t like money because other people don’t know how to spend it.


Oh it was in relation to the article :) the question was "Why, oh WHY, do those #?@! nutheads use vi?" and my first point was in direct reference to this. "Why do people that don't know how to use vim vim" that's all.

At first I wanted to write a direct answer to the article, but since I started ranting about my gripes with vim I tried to change the tone of my comment while keeping my starting argument.

PS. I used to only use nano and people kept asking me why/making fun of me. And most people that told me to use vim didn't know shit about it.


> If you can read mails in your editor you are doing it wrong (sorry emacs users)

Actually I got to know and appreciate reading mail in vim with notmuch-vim and value it over mutt. It provides a consistent user experience with your native vim configuration while the notmuch backend really focuses on the real (mail) stuff. So in this case the phrase about tools which end in an email client holds not always true to everyone.


To be honest I use notmuch+vim as well. I still think that it's not necessarily good that I'm able to do so. (btw thank you both for reading through my rant and actually providing feedback :))


Vim is my main editor, my main gripe is that it performs terribly (without any plugins) with either relative numbers, cursor line or syntax highlighting in files larger than 200 lines.


Did you try different terminal emulators? All these features sound like they cause a lot of redraws, so it could be that the terminal emulator's renderer is the bottleneck here.


I’ve found that a majority of people who use vi(m) and profess to hate Emacs because of the complexity of its shortcuts also spend their whole time in insert mode, using only the arrow keys for movement, leading me to think that these people just hate efficient editing in general.


This does not match my experience at all.

Most people I know use vim and the holdouts use emacs (except for Java developers using Eclipse).

No one in my circles thinks using vim is any cooler or harder than any other editor per se, but it generally meets people’s needs well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: