Live data from Hacker News

Why I can’t stop using Vim

kornerstoane.com

131–140 of 169 posts

Re: Why I can’t stop using Vim

#131
post #92
post #39

Earlier quoted context omitted.

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.

Esc-ping isn't the same either. What makes pressing a key (Escape) to enter a mode better than Ctrl, Alt, Shift to enter a mode? It's also not true that it's impossible to make other editors work like vi. evil-mode in Emacs lets you work like vi.

You don't press escape to enter a mode, you press escape to leave another mode and return to normal mode.

Most vim users are only in insert mode when... inserting text.

Re: Why I can’t stop using Vim

#132
post #108
post #100

Earlier quoted context omitted.

Why have a mode focused on navigation? Is there something this mode allows beyond navigating? What would be impossible to do if you didn't have this mode? The keyboard allows you to navigate too, without the need for a mode.

I interpret it as a positive sign when someone downvotes without an explanation (live above). It's a sign they don't understand a topic well enough to refute its main point. I'm sorry if the comment above also caused you to grow indignant. A better response would have been to zoom in at the main argument and say the most important thing there is about it. If you aren't downvoted enough you are probably not revealing…

Please don't post about being downvoted on HN. As the site guidelines say, it never helps and makes for boring reading.

Downvoting happens to everybody, and most unfair downvotes are corrected after a while by other users, rendering the complaint even more pointless.

Re: Why I can’t stop using Vim

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

> 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. If you are mocking people and their mothers on HN[1], you aren't a respectful person. Within this entire thread, you are being disrespectful, arrogant, and insulting. This isn't what HN is about. Correct your tone or leave. [1] https://news.ycombinator.com/item?id=7961305

> Correct your tone or leave.

It's true that the comment you linked to was way out of line, but if you're going to ask other users to be civil, please be civil yourself. It takes restraint, but it's necessary.

Re: Why I can’t stop using Vim

#134

Earlier quoted context omitted.

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.

Ah, 'k, yeah, I don't do visual selection much.

Re: Why I can’t stop using Vim

#135
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 do all of my programming work in one terminal or another and I still disagree with you. Programming isn't about typing text.

Re: Why I can’t stop using Vim

#136
I've learned to love the modal nature of vim, or rather, the notion that text entry ('insert' mode) is merely one aspect of manipulating text. The combination of movement of commands is very powerful and these days I feel naked when I use editors without this ability.

My first dedicated text editor was BBedit (when it was still freeware), and for many years had extended experiments with other editors, always eventually returning to BBEdit. Something about it always clicked with me, and I felt like Siegel and co. fundamentally understood both the Mac and the needs of programmers.

These days I keep BBedit around for its excellent diff tool, syntax-highlighted multi-file grep search and replace, and its decent project browsing. But it's mostly a supplement to vim (MacVim), which I use all the time when I'm actually in there editing text.

Re: Why I can’t stop using Vim

#137
post #78

Earlier quoted context omitted.

Are you on a mac and using the system default vim? If so, Apple cripples it to not be able to directly access the system clipboard -- use homebrew's vim or macvim instead.

No, I'm on Ubuntu, it just looks like this method doesn't work with terminal vim. Your sibling comment looks like it has a solution, though!

I am not sure which version of vim you are on. I have been using clibpoard paste for a long time in Ubunut. Do a ":version" in vim and check if it's compiled with +clipboard. If it is, then it should work.

Also, you can have this in your vimrc:

  set clipboard=unnamedplus
And then your vim copy-paste will be in sync with system clipboard(no need for +p or +y).

Re: Why I can’t stop using Vim

#138
post #17

Earlier quoted context omitted.

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…

Interesting coincidence, I was pasting a production certificate into Vim the other day and it contained "kj", which escaped the editor and ate a few letters until it reached an "i" and continued pasting. It took production down for 30 minutes until I noticed it. Remember, kids! ":set paste".

> Remember, kids! ":set paste".

Or get used to ctrl-[ which is easier to type than Esc, doesn't skip events(like ctrl-c), and doesn't interfere with anything.

Re: Why I can’t stop using Vim

#139

>q to record a macro; @ to execute it again Is using macros' really common? I haven't yet figured out in when and where to use macros during my workflow.

I do a lot of work on multiple rows/sections/blocks of similar data. My workflow usually goes like this... 1. Do the same thing 3 times, realize that I'll be done faster if I automate it. 2. qz to record a macro into buffer z. 3. Do the work, taking care to leave myself in a state where the next invocation of the macro will pick up right where I want it to. 4. q to finish recording. 5. :map @z to execute buffer z 6.…

> 5. :map @z to execute buffer z 6. Hit Alt-f12 over and over until I'm done

Why map? @z and @@ till your are done? Or if you have this in your vimrc:

      vnoremap @@ :normal! @@
@z, visual select, and @@.

Re: Why I can’t stop using Vim

#140
post #34

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

We’re surrounded by modes. Your microwave has modes; so does your (digital) watch, MP3 player, your wireless access point, etc.

Having modes in a text editor also makes sense; modes provide affordances to get certain things done.

Post reply on HN