News for hackers. Stuff that matters.
Re:A Website for Learning Vim by Someone1234 on Friday December 03, 2021 @12:33PM (#29432660)
Reminder: VSCode, Visual Studio, IntelliJ, and Notepad++ all individually have a higher usage share among professional programmers[0]. Vim is similar to Android Studio. But you'd never know that such un-sexy tools are actually super popular reading technical sites.

And before the "but it is already on your server!" You know what else is installed on almost every *NIX server? Nano. A text editor that needs no deep introduction to be productive or that you have to reconfigure basic keybinds like the arrow keys "because it could break a system not used since the 1970s!"

I know Vim well, I've used Vim a lot, still don't understand the strange obsession people have with getting others into it. You want some professional advice? Don't learn Vim, learn Nano, and use the time you saved to learn VSCode better.

[0] https://insights.stackoverflow.com/survey/2021#most-popular-...

Re:A Website for Learning Vim by 2pEXgD0fZ5cF on Friday December 03, 2021 @12:52PM (#29432871)
With the implication that you "save a lot of time" by learning another editor (nano) you are confusing skill ceiling with skill floor. If you want to compare those editors, compare them at the learning level you are presenting them.

The other editors do not involve any learning if you don't learn anything about them, Vim involves a lot of learning if you learn most of its features. However to use Vim in the way you present the other editors, you don't have to learn much at all, arrow keys work, the gui version has window menus for most options.

Want to use Vim without the learning? i to insert, ESC to go back from insertion mode, arrow keys to navigate, there you are, you are basically using Vim at the level that you want people to use other editors.

If I want much more than that I'll have to learn the features and keybindings of the other editors too. Last time I checked the knowledge of how to search, split panes, switch buffers, search and replace etc. wasn't magically inserted into my brain as soon as I open my copy of VSCode or Nano.

> you have to reconfigure basic keybinds like the arrow keys

Since when do arrow keys not work in Vim by default?

Learning all of Vims features vs. learning only the minimum in other editors is not a fair comparison.

Re:A Website for Learning Vim by spekcular on Friday December 03, 2021 @12:57PM (#29432942)
Other editors don't require nearly the same effort to learn because features are (typically) easily discoverable via the menu bar, or use standard shortcuts. I've never used VSCode in my life, but I bet you a dollar that control-C copies, control-V pastes, and control-F brings up a search dialogue. I also would bet that if I want to split a pane, I can figure out how to do that my mousing around the menu in under ~30 seconds.

Whereas, trying to do pane-like things in vim requires Googling (more efficient in my experience than trying to use the built-in manual) and then reading some stackexchange answer that devolves into a philosophical discussion about the merits of buffers versus tabs.

Re:A Website for Learning Vim by inykt on Friday December 03, 2021 @01:19PM (#29433219)
I think that the journey that you went through (philosophical discussion about...) is more important than just going on with your life which is made easy in VSCode. This eventually gives rise to a community. Like I can assume that hacker news readers can (or figure out how to) exit vim without using any search engine.
Re:A Website for Learning Vim by nyx on Friday December 03, 2021 @02:10PM (#29433902)
I, uh... should preface this by saying that vim is my main editor, and I always install a vim plugin if possible when using a different one. It's great, it makes me faster, etc. etc.

Alright, that aside, when all is said and done I think a lot of people just want to edit their file. Parent comment about having to go to Google to do simple things makes a good point, and the response that "actually, I think having to read a bunch of troglodytes arguing with each other on Stack Overflow is an important part of the experience" is the kind of thing that makes it hard for everyone else to take vim fanatics seriously.

Re:A Website for Learning Vim by llaolleh on Friday December 03, 2021 @01:05PM (#29433039)
The problem with Vim only development we don't have the OS support to use only the keyboard.

Soon or later you have to reach for the mouse to scroll through the browser, or change/rearrange windows, even with all the fancy Vim plug-ins.

Re:A Website for Learning Vim by least on Friday December 03, 2021 @01:59PM (#29433753)
I'm not sure why that's a problem for using vim, as if the only reason people use vim is to avoid using the mouse.
Re:A Website for Learning Vim by Legion on Friday December 03, 2021 @01:14PM (#29433156)
> Reminder: VSCode, Visual Studio, IntelliJ, and Notepad++ all individually have a higher usage share among professional programmers[0].

20 years ago, this list would have had a bunch of different names on it.

20 years from now, it will be different names still.

Meanwhile, vim will still be there, and my knowledge in it built 20 years ago will be serving me still 20 years from now.

Re:A Website for Learning Vim by rattlesnakedave on Friday December 03, 2021 @01:42PM (#29433511)
Knowledge between modern editors and IDEs is generally highly transferrable. You don’t magically forget how to copy / paste when going from Pycharm -> VScode.
Re:A Website for Learning Vim by least on Friday December 03, 2021 @12:56PM (#29432927)
> I know Vim well, I've used Vim a lot, still don't understand the strange obsession people have with getting others into it.

The reason someone might advocate for its adoption can lead to greater availability (this is why there's a vim mode in pretty much every other text editor). Or they think it's a better way to edit text and want others to experience it. I would love if I could edit text in everything as I do in vim because editing text in the more "intuitive" way is slow and clunky and frustrating.

I think what's more peculiar is the strange obsession people have with dumping on vim or on the people who are advocating for its use. It reads as petty and insecure.

Re:A Website for Learning Vim by spekcular on Friday December 03, 2021 @01:01PM (#29432993)
Excuse me, my obsession with dumping on vim is not strange! It is well justified by the fact that, due to several positive comments on HN, I spent many, many hours trying to learn and use vim only to realize that it was fundamentally slower, and imposed a higher cognitive burden, than the editing tools I was previously using. I only want to save other people the same trouble.

I realize my experience is n=1, my editing needs might not by typical or generalizable, etc. But I do think it is important to push back a bit on vim boosterism.

Re:A Website for Learning Vim by goostavos on Friday December 03, 2021 @01:50PM (#29433624)
I'll bump you up to n=2!

I learned vim to, say, like, a low-moderate-ish proficiency? Basically forced myself to use it everywhere at work and home. After a few weeks of this... I went back to just vanilla IDEs/Editors.

For me, it was just a mix of not liking some stuff being handled in vim bindings and some stuff being handled by the IDE's bindings. I'm sure there's a bunch've plugins or customizations that'd smooth it over, but... vim also made me realize, I'm a pretty meat and potatoes text editing kinda guy. I like to shift lines, expand selections in a context aware way, and copy/paste. When I split panes, I do it with the mouse like a cave man. So the bulk of vims power was either lost on me, or felt like it got in the way of my minimal needs.

Also, I pretty much never ssh onto an individual machine to edit anything substantial these days, so... the selling point of having some bedrock transferable "everywhere" skill is kinda moot.

Re:A Website for Learning Vim by least on Friday December 03, 2021 @01:10PM (#29433104)
> I spent many, many hours trying to learn and use vim only to realize that it was fundamentally slower

Your lack of proficiency in vim does not mean it is fundamentally slower.

Re:A Website for Learning Vim by picardythird on Friday December 03, 2021 @01:05PM (#29433029)
> I realize my experience is n=1, my editing needs might not by typical or generalizable, etc.

> I only want to save other people the same trouble.

Pick one!

Re:A Website for Learning Vim by spekcular on Friday December 03, 2021 @01:07PM (#29433063)
I don't think there's anything wrong with saying some people may have needs similar to mine, and some may not. I've tried to spell out in other comments what those needs and experiences were so that people can make an informed decision.
Re:A Website for Learning Vim by picardythird on Friday December 03, 2021 @04:04PM (#29435454)
> don't think there's anything wrong with saying some people may have needs similar to mine, and some may not.

To be frank, it's annoying to go to a HN comments page and find the inevitable "popular tool x sucks because I didn't like it" comments. It seems like they're everywhere, on every link about every tool or product on HN. It's a buzzkill. Of course not everybody is going to like Vim. This link isn't trying to convince anybody of anything, it's just there for anybody trying to learn.

Re:A Website for Learning Vim by picardythird on Friday December 03, 2021 @01:07PM (#29433057)
After just a week in Vim, being required to move my hands of the home row feels like a significant, possibly even disturbing undertaking.
Re:A Website for Learning Vim by knoebber on Friday December 03, 2021 @12:54PM (#29432900)
For me, and I assume many others, vim is fun. It sort of gamifies text editing. There's always new things to learn, and executing advance keystrokes is satisfying. Once you know them, moving to other IDE's is a pleasure because they all offer a vim mode (with varying levels of compatibility). Personally I use vim / emacs + evil / jetbrains depending on the task.

But if you don't care about that aspect, I agree with you, just stick with the boring thing that works. I don't think vim really saves me much time in the long run, but it sure makes my daily tasks more fun.

Re:A Website for Learning Vim by MikeKusold on Friday December 03, 2021 @12:37PM (#29432701)
VSCode, Visual Studio, and IntelliJ all support vim bindings.

For me, the most useful part of vim is that once you learn how to use it, you can switch text editors without needing to relearn most of their shortcuts.

Re:A Website for Learning Vim by rhizome31 on Friday December 03, 2021 @01:03PM (#29433007)
Every time I try an IDE (admittedly not very often) I end up frustrated that its Vim binding implementation is incomplete. It feels even worse than using its default bindings because I start to feel confident and then suddenly it doesn't work as expected and I feel cheated :-) I guess after a while you learn what to expect from the Vim implementation of your IDE of choice but I haven't yet had the patience to reach that stage.
Re:A Website for Learning Vim by drekipus on Friday December 03, 2021 @02:46PM (#29434383)
For this exact reason, I keep going back to vim and doing whatever I was doing on vim instead.

Jetbrains editors have by far the best implementation, but it's not there and I don't think it's possible, due to inherent lag

Re:A Website for Learning Vim by least on Friday December 03, 2021 @02:02PM (#29433788)
I think XCode's new vim mode is the only time I've found it truly jarring how incomplete the mode was, but it's certainly better that it's there than not.
Re:A Website for Learning Vim by wruza on Friday December 03, 2021 @12:49PM (#29432840)
all support vim bindings

Last time I tried za and it didn’t work. These extensions stop right at the impedance raising point, it’s something you should know beforehand.

Re:A Website for Learning Vim by root_axis on Friday December 03, 2021 @01:45PM (#29433551)
I have used all of those editors and a dozen more over the years, but Vim is just the best by a large margin (IMO). The neovim plugin ecosystem includes everything I could possibly want from those IDEs, for every language, and most importantly, only the things I want. Even if we dismiss vim's editing capabilities and its native integration with the wider linux ecosystem (tmux, zsh, ssh, etc), the best part about vim is that it's a blank slate that you can build into an IDE that's highly tuned to the work you do and the way you think, rather than trying to shoehorn every new IntelliJ feature into your workflow just because it exists in an IDE dropdown menu.

I don't begrudge anyone that says "wow, I don't want to take the time to research every damn feature of my IDE, just let me work", that's totally reasonable, and any of those IDEs will let you get the job done - for me - the time invested is worth it because of how much of my life is spent editing files on my computer.

Re:A Website for Learning Vim by spekcular on Friday December 03, 2021 @12:47PM (#29432817)
I tried hard for a few months to be efficient with vim. At the end, I was still faster with a laptop keyboard and trackpad for selecting and editing text at arbitrary places in a document ("random access editing").

One case where I find a mouse/trackpad essential: editing LaTeX documents. Being able to control-click to jump between a spot in the compiled .pdf and the corresponding source code, or the reverse, is invaluable (a feature supported in TeXShop, for instance). I realize that one can probably set up a similar system in vim. But, the appeal of vim for me was that, at the cost of learning a bunch of arcane keyboard shortcuts, I could go mouseless and as a consequence be faster. If I'm going to keep the mouse, the value proposition seems a lot worse.

Re:A Website for Learning Vim by sophacles on Friday December 03, 2021 @01:26PM (#29433307)
Then use your mouse to highlight and do random access editing in vim? this has worked just fine for ~20 years.

Source: my experience of using vim for the last ~20 years

Re:A Website for Learning Vim by picardythird on Friday December 03, 2021 @01:04PM (#29433012)
Popularity is not a good a metric for comparing value. If we were to use it for choosing where to shop, the top choice would be Walmart [0]. This isn't to say that VSCode is bad, just that Vi/Vim being less popular doesn't mean it's not worth it for anyone to learn. It's also good to have a healthy field of tools to pick from. Plus, learning Vi to a degree that is productive takes a week of use, and then the keybindings can be applied elsewhere, such as VSCode.

[0] https://nrf.com/resources/top-retailers/top-100-retailers/to...

Re:A Website for Learning Vim by jeppesen-io on Friday December 03, 2021 @01:19PM (#29433216)
So, don't learn vim because it's marketahare is "small"? Larger than xcode, atom, sublime and even notepad++ when you add neovim? That logic makes no sense and even if it did, the chart you linked still shows vim to be one of the largest is the world

> you have to reconfigure basic keybinds like the arrow keys "because it could break a system not used since the 1970s!"

Never had to do that on Nixos, Ubuntu, Amazon Linux, RHEL, MacOS or WSL

For my workflow with lots of context switching between code and commands, using only a terminal is more efficient use of my time. VSCode cannot do that in a way that works for me

But ignoring all of that, many use [neo]vim because they simply enjoy it. Enjoyment does not need justification

Re:A Website for Learning Vim by AnthonyMouse on Friday December 03, 2021 @01:53PM (#29433665)
> Reminder: VSCode, Visual Studio, IntelliJ, and Notepad++ all individually have a higher usage share among professional programmers

This is an artifact of the structure of the question. They're not asking what you use the most, they're asking what you use at all. Check all that apply.

So then you check Notepad++ even if you're a Linux developer who primarily uses vim or emacs but have Notepad++ on your rarely used Windows VM. You check Visual Studio or VS code if you had to contribute to an existing project which is tied to its build system, even if you avoid it whenever possible.

A quarter of all developers use vim. That's not a small number and it's not for no reason.

Re:A Website for Learning Vim by maccard on Friday December 03, 2021 @12:53PM (#29432888)
Something like this website doesn't teach you vim, it teaches you vi keybindings and the basic concepts. Vim bindings are available in all the editors you mentioned (although my understanding is that the Notepad++ bindings in particular are bad). For the people who say they're using vim productively, they're usually running some combination of plugins (that hopefully don't step on each others toes) that emulate the featureset of an IDE that they want to use.

And you're bang on wrt nano existing everywhere vim does!

Re:A Website for Learning Vim by ilovecaching on Friday December 03, 2021 @12:56PM (#29432924)
You should lookup Argumentum ad populum. There are still many reasons to use a free and open source keyboard centric editor that can run as a TUI, has stayed around for 30 years while other Microsoft owned editors died on the vine barely 5 years into their lifespan.

If my professional opinion, learning vim or emacs will give you a tool that will last you several lifetimes and can grow with you as you customize it to your specific needs.

Re:A Website for Learning Vim by rhizome31 on Friday December 03, 2021 @01:07PM (#29433064)
So true! When I started as a professional programmer they were using Eclipse, then Textmate was the big thing, then it was all about SublimeText and now it seems everybody has moved to VSCode. And here I am still using Vim happily after 20 years...
Re:A Website for Learning Vim by youerbt on Friday December 03, 2021 @01:28PM (#29433335)
I agree, don't use vim the text editor. But please, give a try to vim the editing paradigm, supported by all those programs or a reason via plugins.
Re:A Website for Learning Vim by TeeMassive on Friday December 03, 2021 @02:34PM (#29434242)
> but it is already on your server

This is indeed not a good reason to learn Vim nowadays indeed. Vi has more chance to be present than nano on a stripped image by the way but I digress.

For me Vim started to make sense when remote work has begun to be the new normal. VPNs make with remote desktops make everything slower. I worked in places where we had to use two VPNs at the same time. Then I saw the hacker wizard kid using vim like he was Edward Scissorhands and how much more productive he was.

Re:A Website for Learning Vim by nullwarp on Friday December 03, 2021 @01:09PM (#29433087)
I use VSCode, IntelliJ and Notepad++ all with VIM mode. VIM isn't just the editor, it's a style of editing.

Honestly if an editor doesn't have VIM mode, I don't use it.

Re:A Website for Learning Vim by Aperocky on Friday December 03, 2021 @01:41PM (#29433492)
Nano and almost everything here you listed (without vim bindings) are not modal editors.

Here's some other professional advice: people liked vim because it is modal, that means the coding process itself can be automated, scripted on, insanely fast and can completely forego mouse/touchpad input.

Vim bindings by themselves are great, but they are not fully vim, for instance, most vim bindings including this website does not support `:norm`

Re:A Website for Learning Vim by lucideer on Friday December 03, 2021 @12:43PM (#29432768)
I use VSCode. And vim. Every day. Am I a VSCode user or a vim user? Probably the former (my usage is slightly higher, but not significantly).

I suspect some variation is the same for many; it's a likely driver of demand for vim bindings (which are ubiquitous).

Even if people's daily usage of vim is much lower than their GUI-IDE of choice, the aggregate is likely far higher than reported.

Re:A Website for Learning Vim by Someone1234 on Friday December 03, 2021 @12:53PM (#29432896)
The survey cited allowed you to select multiple. So your assumptions about what the data shows isn't based. Here is the question text:

> Which development environments did you use regularly over the past year, and which do you want to work with over the next year? Please check all that apply.

Pretty fair question if I've ever seen one.

Re:A Website for Learning Vim by prionassembly on Friday December 03, 2021 @01:08PM (#29433073)
That survey is potentially very biased -- 92% of professional developers are male?
Re:A Website for Learning Vim by AnthonyMouse on Friday December 03, 2021 @01:34PM (#29433400)
That's the real number.