Live data from Hacker News

Why I can’t stop using Vim

kornerstoane.com

31–40 of 169 posts

Re: Why I can’t stop using Vim

#31
post #17
post #4

"/ for searching (really, no other editor has made it this simple)" Well, it's really esc-/ which is no easier than ctrl-f. Or am I missing something? Edit: Same with "1G to go to the top of the file, G to go to the bottom" - esc-1-shift-g vs ctrl-home. Same with ctrl-end.

I think you're using the editor's modality wrong. ESC is not used to exit from Insert mode. ESC is used to switch from any mode back to Command mode. In fact Command mode is also called Normal mode. You should spend 95% of your time in Normal mode and use the other modes when you need them. I suggest binding `kj` to ESC since it allows you to quickly make a change and continue browsing your code. Take the following s…

I use 'jj' rather than 'kj' and except for a pause after I type the first letter of 'join', it works well.

Re: Why I can’t stop using Vim

#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 feature you need).

Oh, and on a side note:

Vim and terminal usage is not a "time sink" and it pains me whenever I hear people who consider them selves "programmers" claim it to be. If you haven't learned how to use the terminal yet (or haven't found a use for it) then you aren't a respectable programmer IMHO. I would not read a book on programming by someone who doesn't know how to use a terminal and I would not take a class on programming taught by a professor who doesn't know how to use a terminal.

Re: Why I can’t stop using Vim

#33
post #5

I don't really understand the comment about etags; if you use ctags in Vim, you'll get the same kind of functionality. If you want something more advanced, Emacs has support for cscope and GNU Global which give you more features. Considering that he's interested in having something better than VimScript and wants org-mode, it seems that Emacs + Evil would really be the best fit for him.

I've never had any problems with etags, either. I've always gotten the same functionality as vim. Maybe we are missing something.

I had this same problem: they function differently in evil mode than Emacs mode; for some reason evil does its own word boundary definitions for etags lookups, and it breaks up words on underscores. I dug into it, and it was some problem with evil's word semantics (that only existed for etags lookups). I ran out of energy to debug it further, and just went back to Vim.

Regular etags called with the emacs bindings worked just fine, but switching contexts from evil mode was a pain.

Re: Why I can’t stop using Vim

#35
post #26

I know this is a minor point but using 'gg' to move to the first line is easier than '1G'.

The author started in vi, which has no gig as far as I can tell.

And I use :0, which is consistent with :N to get to the Nth line, which I also use. (I know, :1 same, just my habit.) And I could use :% to get to the last line, for more consistency, but G is my habit there.

Many ways to edit a cat.

Re: Why I can’t stop using Vim

#36
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…

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?

Re: Why I can’t stop using Vim

#37
post #34

What I never heard explained in one sentence about vi is: why have multiple modes? Why not zero modes instead?

Because as a programmer your time is dominated by editing rather than creating text, therefore it is more efficient for every key to default to direct access to an editing function.

Re: Why I can’t stop using Vim

#38
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…

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?

Re: Why I can’t stop using Vim

#39
post #34

What I never heard explained in one sentence about vi is: why have multiple modes? Why not zero modes instead?

If you have multiple modes you can basically reuse the entire keyboard for commands. That's one advantage that is impossible to achieve in non-modal editors. Ctrl-ing, Alt-ing, Shift-ing stuff just isn't the same, especially as those commands get more and more complex.

Re: Why I can’t stop using Vim

#40
post #34

What I never heard explained in one sentence about vi is: why have multiple modes? Why not zero modes instead?

Multiple modes allows the same keys to do different things in different modes, there isn't much more to it than that.

Say, at a Bash shell prompt in a terminal window, pressing Ctrl+R starts "reverse command search" mode, so that pressing letter keys searches for commands entered in the past, rather than entering a new command. In this mode, up and down move through search results, rather than moving through the entire command history like in "normal" mode.

Lots of software has modes, the unusual thing about Vim is that they have names, and that there is a mode with a focus on navigation.

Post reply on HN