Live data from Hacker News

Why Vi Rocks

why-vi.rocks

51–60 of 80 posts

Re: Why Vi Rocks

#51

I’ve learned some vi, and emacs, Visual Studio, VS Code, XCode, IntelliJ, and Android Studio. All the examples listed are pretty uncommon or trivial in any of the other IDEs (aside from the regex part, which is cool, but I never want to be in a place where I have to regex my code...ever). 90% of the time I’m doing simple code maintenance, with an occasional refactoring. And I know devs that swear by vi...they are dev…

I am writing this from emacs experience (some if not all these features are in vi as well), there are features from emacs that make a real difference in writing programs especially: * Unlimited yanking from kill rings: ie pasting text from history of the clipboard.(This is one thing I have most difficulty with when switching from emacs to modern editors) * Macro recording and playback : recording an arbitrary set of…

> two or more code frames/windows side by side, even displaying the same file Surprisingly modern IDE guis seems not designed for it, eclipse can do it but clumsily.

It's embarrassing how much better emacs/vim/tmux/others are at windowing compared to supposedly advanced IDE's built on advanced windowing systems.

Re: Why Vi Rocks

#52
post #28

IntelliJ with the IdeaVim plugin is my goto editor nowadays. As others have said, I honestly don't find myself using the really fancy features of vim that often. What I do use frequently are basic motions together with yanking, deletions, word movement (w/e/b), marks, indents, centering (zz), page scrolls (ctrl+u/d), and using searches (f and /) to jump around in code quickly. For those purposes, IdeaVim works just f…

Have they fixed the issues with where the cursor ends up after certain operations? It's been a couple of years since I've used it, so I can't give an explicit example, but there were multiple common operations where the cursor would end up in a different location afterwards than it does in vim. This was really difficult for me because I still used vim a lot for other things, and it felt like it was actively eroding m…

I use IdeaVim at my day job and can confirm it's gotten better. There are still some rough edges, especially around handling movements like L, M, and H which don't always go where you expect them to. And some operations like undo don't play well with the vim commands such as undo.

And yes, I completely agree about switching between vim and ideavim for different languages, the experience is very different and the sight differences are very noticeable.

Re: Why Vi Rocks

#53

I’ve learned some vi, and emacs, Visual Studio, VS Code, XCode, IntelliJ, and Android Studio. All the examples listed are pretty uncommon or trivial in any of the other IDEs (aside from the regex part, which is cool, but I never want to be in a place where I have to regex my code...ever). 90% of the time I’m doing simple code maintenance, with an occasional refactoring. And I know devs that swear by vi...they are dev…

If you're still working with VS & Resharper and your projects allow you to, have a look at Rider from JetBrains. It supports the same color scheme & hotkeys as VS + Resharper out of the box so the transition is very smooth, you'll be productive in minutes after installing it. Also, if you were using VsVim, you can use IdeaVim for Rider and in addition you can install KJump plugin (it's what easy-motion is for vim). Since setting this up, rider & webstorm have become my favorite developer tools I have ever worked with and I feel they are superior to VS & VSCode (the things I was using before).

Re: Why Vi Rocks

#54
post #9

i see people struggling, fighting with Intelli-J every day. I wish I could give them vim as a gift. All the extra stuff you think you can't possibly give up you don't need. I'm a professional text file editor. Vim is like playing the piano. I guess what I'm saying is learn to play the piano for real, and don't spend your life in a piano-player-helper IDE thing.

Sure, but I bet Intellij is a bit better when it comes to debugging java applications. A good IDE beats the crap out of Vim for a lot of tasks.

> Sure, but I bet Intellij is a bit better when it comes to debugging java applications.

I don't know about intelliJ specifically, but a good debugger beats the crap off the limited interface an IDE provides to them. It looks like IntelliJ only offers basic breakpoint/step through, etc. For a quick overview of what you're missing out on checkout "Give me 15 minute and I'll change you min on GDB": https://www.youtube.com/watch?v=PorfLSr3DDI (hopefully the right video, can't check at work)

Re: Why Vi Rocks

#55
post #14

Vim is like Dvorak. The cognitive burden for remembering which key maps to what is high unless you use it 24/7.

Does anyone use Vim on a Dvorak keyboard?

I used dvorak for a bit. I didn't remap HJKL, since JK were still beside each other, and H was to the left of L (albeit, not on the same row).

In terms of transferring Vim 'motor memory' from a qwerty layout to a dvorak layout, IMO it meant focussing more on an added indirection of "which letters" rather than "which fingers where".

Re: Why Vi Rocks

#56
post #50

Earlier quoted context omitted.

I am writing this from emacs experience (some if not all these features are in vi as well), there are features from emacs that make a real difference in writing programs especially: * Unlimited yanking from kill rings: ie pasting text from history of the clipboard.(This is one thing I have most difficulty with when switching from emacs to modern editors) * Macro recording and playback : recording an arbitrary set of…

> some if not all these features are in vi as well I'm not sure exactly which vim features are also in vi. Vim has been a daily use tool for me since about 2007. Vim has really good Macro recording. Vim + Tmux is great for side by side code frames, and there are plugins for showing multiple buffers in one Vim instance. Remote file editing is good with SSH + Vim. Vim has multiple registries for yanking/putting. Vim ha…

Unless I've misunderstood, you can use splits to show multiple buffers in Vim without any plugins.

Re: Why Vi Rocks

#57
post #50

Earlier quoted context omitted.

I am writing this from emacs experience (some if not all these features are in vi as well), there are features from emacs that make a real difference in writing programs especially: * Unlimited yanking from kill rings: ie pasting text from history of the clipboard.(This is one thing I have most difficulty with when switching from emacs to modern editors) * Macro recording and playback : recording an arbitrary set of…

> some if not all these features are in vi as well I'm not sure exactly which vim features are also in vi. Vim has been a daily use tool for me since about 2007. Vim has really good Macro recording. Vim + Tmux is great for side by side code frames, and there are plugins for showing multiple buffers in one Vim instance. Remote file editing is good with SSH + Vim. Vim has multiple registries for yanking/putting. Vim ha…

Remote editing, I mean using the local computer's emacs to edit file on the remote computer, where emacs does all the work of fetching and syncing the file (using ftp, ssh etc) back to remote. I think vim can do something similar too.

Re: Why Vi Rocks

#58

Earlier quoted context omitted.

I have a friend who used to use Vi(m) with his Dvorak keyboard at home, and Emacs with his qwerty keyboard at work. He considered it an exercise for keeping his brain sharp. I don't think he still does it, but maybe. Vim on Dvorak is insane, imho.

Why do you feel that Vim on Dvorak is insane?

Motion in Vi is based on treating the home row of the keyboard as arrow keys. H, J, K, and L are left, down, up, and right. They aren't mnemonics, and so scrambling them around (Dvorak) is just doubly confusing.

Re: Why Vi Rocks

#59
post #21

Earlier quoted context omitted.

> And I know devs that swear by vi...they are developing any faster than I am I hear about this from time to time, but have never seen it people do it successfully first hand, what I do see is silly mistakes in their checkins; incomplete variable renames, formatting is off, syntax errors, switching between browsers and their code while looking at manuals, or other obvious mistakes that can be caught inline by IDEs wh…

Hmm, I've got syntax/compile checking, linting, automatic code formatting and generation, and code completion based on context in vim right now. I don't see how any of the problems you mention are vim specific.

What packages are you using and what language out of curiosity?

Re: Why Vi Rocks

#60
post #50

Earlier quoted context omitted.

> some if not all these features are in vi as well I'm not sure exactly which vim features are also in vi. Vim has been a daily use tool for me since about 2007. Vim has really good Macro recording. Vim + Tmux is great for side by side code frames, and there are plugins for showing multiple buffers in one Vim instance. Remote file editing is good with SSH + Vim. Vim has multiple registries for yanking/putting. Vim ha…

Unless I've misunderstood, you can use splits to show multiple buffers in Vim without any plugins.

What about manipulating of splits, like converting vertical split to a horizontal split, enabling/disabling synchronized scrolling, etc..
Post reply on HN