Hacker News new | ask | show | jobs
by beny23 2049 days ago
The ability to efficiently navigate and edit files while SSH’d into an instance is a very useful skill. You just wouldn’t have the permissions to install your favourite editor and vi is almost everywhere.

I had to learn vi when working on green screen terminals logged into HP/UX and there was no alternative but am very glad I did as I find that nothing as ubiquitous allows me to efficiently change files.

Does that mean I would go around advocating one editor over another? No, whatever works for you. I know vi works for me for editing files.

Would I use vi instead IntelliJ for development work? No, I found the development environment allows me to be more productive on project work.

But I think you’re doing students a favour teaching vi.

2 comments

I've been a professional developer for 10 years and programming for longer than that. In all of that time, efficiency of editing files on a remote server has never been something I've needed to optimize or been concerned about. Have I had to do it? Yeah, occasionally. Yet when I do, it's almost always changing a config file in a minor way.

Back when I started it was editing the code on a live server so I used textwrangler/notepad++ with an ftp editor.

I don't buy the argument that learning an editing paradigm for this very specific use case (which is likely getting less and less common) at all. This is coming from someone who uses vim bindings in my daily editor.

Depends on what you need to optimise for. Being able to navigate a text file efficiently (i.e. not character-by-character using arrow keys), cut and paste text, save/rename/backup files, and sometimes even to do a diff from within your text editor, are all skills I’ve found very useful. I’m an Emacs user on my own desktop, but if you run Linux servers in this kind of environment and you or your team doesn’t manage them yourselves, then the best you can assume you have is Vim, or maybe Vi. If all you’ve got is SSH, it helps to be able to do this stuff without wanting to pull your hair out. Even watching some co-workers stumble through the use of Vim can be painful enough.
Of course with the ubiquity of cloud and minimal images I think the likelihood of having any but the basic tooling on a remote instance is getting more prevalent than not less and the ability to diagnose/debug issues is getting more important. Might not be a Dev but more of an Ops “good to have” but with more places adopting “you build it you run it” and Dev merging with Ops, I don’t think this is an isolated use case.
Why the dichotomy? IDEA Vim is an excellent IntelliJ plugin. For XCode there's XVim2 and Visual Studio has VisualVim. In fact the pervasiveness of good Vim plugins for ide's is one of the factors in Vim's lead over Emacs.
There’s a decent VS Code plug-in as well
Or even better onivim.io