Live data from Hacker News

Why I can’t stop using Vim

kornerstoane.com

111–120 of 169 posts

Re: Why I can’t stop using Vim

#111
I can't stop using vi key bindings, whether that's Evil for Emacs, VsVim for Visual Studio, the Intellij one, Sublime, etc..

But my days of using straight Vim are over. For a straight text editor, I finally got over the hump with Emacs recently, and I'm not going back.

Re: Why I can’t stop using Vim

#112
post #38

Earlier quoted context omitted.

In my opinion, other people's opinions about how I program are worth just about nothing. I'll never understand the sort of arrogance that leads to posting things like that. do you really believe you're so smart that you figured out the only way anyone should do anything?

Well, I wasn't trying to be arrogant.. sorry. But would you really take a programming class taught by a professor who doesn't know how to use a terminal?

Fondness for the terminal or shell is a question of mindset, not ability. You might be surprised (as I was... and, if I'm honest, still am, a little) at how many skilled programmers there are who don't know how to use it, and how many of those that do know, don't actually make use of that knowledge. And yet, they are still worth paying attention to, unless perhaps you're wanting advice about shell commands.

And on the flip side I have also met a number of (relative) dullards whose shell skills were unquestionable.

Re: Why I can’t stop using Vim

#113
post #69
post #32

I went back to Sublime after using Vim for a while but then realized I was going to have a terminal open 24/7 anyway so what's the point? Then I learned how to use a terminal multiplexer and now Sublime and other GUI editors just hinder my workflow. IMHO if you're a programmer you should know how to use a terminal to the point that you prefer it over most GUIs (of course, you should always use whatever has the featur…

I'm not a seasoned user or anything, but I prefer to use Emacs with a GUI rather than in the terminal. It has nothing do with there being more GUI-type things in there - I have things like save-icons etc. turned off. It just feels more like it's own application in GUI mode (if I run it in terminal mode, the Meta hotkey doesn't work as usual, which I suspect is because the terminal is using the alt-key (meta) for some…

Running in a terminal means you can run it in screen/tmux, which has a few upsides, though they may not be relevant to your workflow.

Re: Why I can’t stop using Vim

#114
post #96

Earlier quoted context omitted.

That's too broad of a stroke on what a programmer does with text. It's not just about editing. It's also about (a) moving to the point where you want to edit, (b) moving to an other point right after you just finished editing. Switching between the two becomes harder when you always have to Escape, compared to having direct access to an arrow key. And (c) about editing. Why type an extra character (i for insert) to l…

In modern vim you do have direct access to the arrow keys. Rarely is this meaningful, for someone skilled in vim. It can potentially be faster if you need to move just a couple characters over, but if you need to move 25? It winds up being something like: Esc 22hhhh People navigate by jumping across words, across features, searching...

I wonder if there's navigation modern vim doesn't offer. Can you tell if or how you can do the following in vim?

In Emacs, Ctrl- moves the cursor ahead of a block of code. If you had a for loop for example, with a blank line where the for begins and a blank line where it ends, and the cursor was at the blank line where it ends, pressing the two keys Ctrl and would put you in the beginning.

How would you do this in vim? Would you have to first gauge how many lines of text up you should move?

Re: Why I can’t stop using Vim

#115

I use a text editor because using a text editor that you've mastered is pleasant. (I'm an Emacs user fwiw.) I think we should stop trying to rationalize this choice. Or rather, we should realize that we like text editors because we went through a long training and acquired complex skills which are fun to put in practice. Being a power user of Emacs or Vim is is satisfying, the same way mastering a video game is satis…

If that is so, why do people change text editors? (I agree with you, I just wonder this myself)

If the analogy holds, the answer is the same reason people play different video games. I think the analogy holds a bit: variety and different kinds of mastery feel like a correct answer.

Re: Why I can’t stop using Vim

#116

I suffer from the same thing. I've gone even futher: I've customized my tiling wm to work with the vim keybindings; my file manager also works with those keybindings; I use vimperator, a firefox plugin, that has those keybindings... There's a lot of stuff that I wish were better in vim, but, at the end of the day, it gets my work done better than anything else out there, so I don't have any reason to move away from i…

Yep. Pretty much every piece of software that I write for myself or use I write or customize so that it has vim style modes and keybindings. Keyboard input is still the highest bandwidth human computer interface (voice can't quite make it because error rates mean that the bandwidth actually ends up being lower), and modality is an excellent way to reduce complexity and provide simple cues that make it easy to compartmentalize and remember lots and lots of useful commands.

Re: Why I can’t stop using Vim

#117
post #20

First you'll learn how to orientate around text quickly using normal mode, then you'll start playing with tabs, splits and buffers to search between multiple files, and then you'll start using registers to save phrases and regular expressions to search directories. At that point you'll never want to leave Vim again. :wq

> then you'll start playing with tabs, splits and buffers

I want to like vim's window management but it's pretty quirky, at times it seems to be following the principle of most surprise.

Ideally one could use tabs (that aren't renamed to the buffer name when populating a named tab), splits, and buffers together in such a way that one's layout never, for example, collapses, leaving a single displayed buffer and N hidden ones, or a buffer getting cloned across 2 splits (the latter is pretty disorienting, unless I'm diff'ing versions of a file I don't ever want to see 2 versions of the code consuming visible screen area).

Granted am only 3 days into the vim WM experiment here, lot's to learn...

Re: Why I can’t stop using Vim

#118

Earlier quoted context omitted.

That's actually kind of an interesting idea. $ for end-of-line always bugs me; for something so common I don't think it should require a chord. '999l' is pretty easy to tap out. On the other hand, it would probably be easier to rebind something like '-' as end-of-line. I'd do backspace, but I've already changed that to PageUp (backspace/space work great as PageUp/PageDown)

Is it common? It's really rare that I need to go to the end of the line and not switch to insert mode. If I do want to go to the end of the line and switch to insert mode, then what I want is A not $. Of course, there's a chord either way, but I'm surprised if you're finding it easier to type 999l than A.

Oh, no - I use A all the time. My use case is generally more v$ followed by some other movement backwards then c,d or y, or Ctrl-V $ and move upwards/downwards.

Re: Why I can’t stop using Vim

#119

Earlier quoted context omitted.

:x (It's the same as :wq, but one character shorter.)

Even shorter: ZZ "Shift z z" is one key shorter than "shift colon x enter"

Colon? That sounds painful, map it to some single keystroke. I use back slash on my tiny cherry keyboard.

    noremap \ :

Re: Why I can’t stop using Vim

#120
post #114

Earlier quoted context omitted.

In modern vim you do have direct access to the arrow keys. Rarely is this meaningful, for someone skilled in vim. It can potentially be faster if you need to move just a couple characters over, but if you need to move 25? It winds up being something like: Esc 22hhhh People navigate by jumping across words, across features, searching...

I wonder if there's navigation modern vim doesn't offer. Can you tell if or how you can do the following in vim? In Emacs, Ctrl- moves the cursor ahead of a block of code. If you had a for loop for example, with a blank line where the for begins and a blank line where it ends, and the cursor was at the blank line where it ends, pressing the two keys Ctrl and would put you in the beginning. How would you do this in vi…

Potentially depends a bit on the language and what plugins &c you have installed. For C on a basic install, you can say [{ to jump to the enclosing { (and there is the symmetric ]} as well). You can also use { and } to step over "paragraphs". And of course, if your goal is to replace the body of the for loop, ci} will delete everything inside the innermost containing {} and switch you to insert mode.
Post reply on HN