Live data from Hacker News

Why I can’t stop using Vim

kornerstoane.com

61–70 of 169 posts

Re: Why I can’t stop using Vim

#61

>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. Hit Alt-f12 over and over until I'm done.

Seems like a lot of steps, but it has saved me tons of time.

Of course, as the other commenter said, some folks don't use the feature. That's ok. There's room for all kinds :)

Re: Why I can’t stop using Vim

#62
post #34

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

What I have found is that ALL editors have modes. Most default to edit mode, and require key sequences to invoke other commands (Ctrl, Alt, Shift, Function keys, Menu choices, etc), then drop you back into edit mode.

Vi chose _a_ way of working. Turns out, a lot of folks have taken to it over the years. (And a lot haven't. They're nice people, too) :)

EDIT: fixed a typo

Re: Why I can’t stop using Vim

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

You seem to be making the assumption that knowing how to use the terminal is equivalent to preferring to do everything in it. What about people that know how to use the terminal, but prefer to use a GUI text editor like Sublime?

Re: Why I can’t stop using Vim

#64
post #38

Earlier quoted context omitted.

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?

Knowing how to use a terminal != using a terminal for everything.

I never said that. Anywhere.

Re: Why I can’t stop using Vim

#65
post #53

Earlier quoted context omitted.

What programming do you do? css?

I do C# in Visual Studio all day long. Rarely (if ever) need to touch the terminal. Hundreds of thousands of people use my apps. But nope - I guess I'm not a real programmer because "I don't prefer the terminal". Give us a break mate. Nobody agrees with you.

WorldWideWayne thanks for opening my eyes. You sure are smart. :^)

edit: I just had to post this from your comment history, I think we could both use a chuckle:

"I'm the other VIC-20 vote so far and I don't know where my family had gotten that computer. It came with a book of BASIC programs that you could type in but we didn't have have a storage unit (tape drive), so each time I wanted to play a game I had to type the entire program in and run it. Most of the time I asked my mom to type it in for me, but I remember a couple of times that I spent the hour hunting and pecking in order to play my favorite game (Moon Rover or something, I forget the name)."

You still getting mom to type in terminal commands for you?

Re: Why I can’t stop using Vim

#66
post #46

Earlier quoted context omitted.

If you join my team and tell me you're a programmer but when you sit down with a terminal you have no idea what to do, then you're off my team and I don't respect you as a programmer. Sorry if this offends you, but how can you consider your self a programmer when you don't know how to use a terminal?

So Windows programmers, according to you aren't programmers?

Do windows programmers not know how to use a terminal?

Re: Why I can’t stop using Vim

#67
I spent this entire weekend setting up Evil mode for Emacs, in the Emacs Starter Kit package. It's been decent so far. Evil mode is surprisingly good, and I really don't think it could come any closer to vim emulation for Emacs. Took a lot of googling around to set up some basic plugins that I need - projectile for CtrlP etc. I think the only thing that I need atm is Magit integration with Evil and I'll be good to go.

What has been amazing so far is that even after using vim for almost 3 years, I'd been sort of afraid of diving deep into the config system (I made do with copy-pasting some popular vimrc files) and it was good enough, but in the short span of 2 days, I've actually gotten to know more about emacs configuration style than I ever did about vim. And I suspect it will only get better as I start to learn Emacs Lisp.

Re: Why I can’t stop using Vim

#68
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".

"+p will paste the system clipboard.

Re: Why I can’t stop using Vim

#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 something else and so it overrides that hotkey). Why should I prefer to use Emacs in terminal mode? I am honestly open to changing my mind.

Re: Why I can’t stop using Vim

#70

>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.

Macros are fabulous! Any time you're going to edit multiple lines in the same way, bam! For instance, you've got a create table script, and want to turn the column defs into some code or type definitions. For me, macros are quicker than getting a regex right.

Or perhaps you're cleaning up a file, and there's a few common changes. Pop each into a macro and go to town. The low friction aspect makes them more common than the name might sound.

Post reply on HN