r/ProgrammerHumor • • Oct 05 '18

vim vs emacs

Post image
605 Upvotes

103 comments sorted by

View all comments

0

u/[deleted] Oct 05 '18

[deleted] — view deleted comment

54

u/WeededDragon1 Oct 05 '18

You haven't seen someone program in vim who is really good at keybinds then.

I can't do it, but one of my professors was insane.

19

u/Lost4468 Oct 05 '18

I've never seen anyone be able to do it significantly faster than I can do it in a normal text editor. Please do try and find me a video, I've looked all over YouTube and have never found anything.

14

u/Fimbulthulr Oct 05 '18

The Question is not necessarily if you are faster at writing with vim/emacs/etc, it is if you are faster with everything you need to do in total. I often work on a server with no x installed, and it sometimes does weird stuff, meanig I have to test my code on the server anyways. since I am about as fast with vim as with a "normal" editor, I do not bother with using scp to move the files back and forth constantly and just use vim instead.

→ More replies (1)

35

u/WeededDragon1 Oct 05 '18

I'd imagine the cross section of people who can use vim really well and people who make youtube videos is not very large.

18

u/Lost4468 Oct 05 '18

Oh no, there's plenty of videos, examples, presentations from famous vim users at PyCon and others. Just none are at all impressive.

5

u/McFunkerton Oct 05 '18

How about an ascii animation then?

→ More replies (1)
→ More replies (1)

6

u/k4b6 Oct 05 '18

This guy shows how most programmers could use vim as a programming editor https://www.youtube.com/watch?v=o6omymj1JZI

4

u/Lost4468 Oct 05 '18

Thanks that's a rather good one. Do you have any longer or time lapse examples because for all I know this possibility only comes up once every few weeks.

→ More replies (1)

3

u/cartechguy Oct 05 '18

You can do what I do. I install extensions in my IDE that give me vim key bindings. When I know a vim keybinding and know it's faster than using the gui I use the keybindings. Otherwise I use the gui.

5

u/cbbuntz Oct 05 '18

It's hands down faster when you know the keybindings and commands. It takes years to get good at it though.

2

u/Soultrane9 Oct 10 '18

I've never seen a project where the speed of text editing is the bottleneck of delivery.

→ More replies (5)

23

u/Jmcgee1125 Oct 05 '18

Nano is the Notepad of Linux, is what I say. It serves its function for, as you say, small edits.

12

u/GND52 Oct 05 '18

The people who program in their terminal are the professional help.

16

u/FuzzyConflict7 Oct 05 '18

There are tons of people who program with vim or emacs in the terminal. There are huge advantages to using them. Nano has none of the features of those editors.

I use VS Code, but with the vim keybindings.

8

u/[deleted] Oct 05 '18

+1 for VS Code with the vim extension. Been using it for over a year now and it works really well.

9

u/[deleted] Oct 05 '18

Nano has none of the features of those editors.

[ XOFF ignored, mumble mumble ]

→ More replies (1)

9

u/granos Oct 05 '18

I have used vim as my primary editor for the last 10 years or so. There are so many things that I can do in vim with a handful of keystrokes that would require using a mouse in graphical editors -- or simply aren't possible.

About a month ago I got a requirement that was basically a big list of "if this then that" type stuff. I took the requirements directly from the ticket and pasted it in vim. I manually did some text transformations on the first line until it was valid code that did what I wanted -- took about a minute. Before I did any changes, I had started recording a macro (qa). Then I replayed the macro 29 times (29@a) and the rest of the work was done.

Block highlighting an multiline editing is enormously powerful.

I can't remember the last time I scrolled through a file looking for something in vim. I just jump to it by name or line number if I know it.

Vim takes A LOT of effort to master -- I still learn new stuff about once a week -- but the power and speed are just unmatched by any graphical editor I've ever used. That may be in part because I haven't mastered those, but a large part is that you start to think in terms of text transformation operations and you can accomplish them all without moving your hands from the keyboard.

2

u/fghjconner Oct 05 '18 edited Oct 05 '18

Sublime text can do literally everything you just said (except maybe playing back a macro a set number of times, I don't know). It has macro recording (or for something like that I'd be tempted to use the regex find and replace or multiple cursors), multiple cursor support, goto line, goto definition, all without touching the mouse.

Edit: There's a plugin for repeating macros

2

u/granos Oct 05 '18

Thats great. There has been some really awesome work done in the text editor space the last 5ish years. Sublime didn't exist when I started learning vim and just wasn't up to snuff at first.

It also doesn't play well with X-less servers, which is a big concern for me.

→ More replies (1)
→ More replies (2)

3

u/DoesntReadMessages Oct 05 '18

It's not that it's bad, it's basically command line notepad. It's just the worst of the three in every way except that it has no learning curve instead of the 30 seconds it takes to learn VIM or 30 minutes it takes to use EMACs.

Like literally just learn :q!, :w, i and / and VIM is already significantly more productive than nano.

→ More replies (1)

3

u/[deleted] Oct 05 '18

I often need to edit files through an SSH connection, sometimes to minimal environments with only nano or vi installed. I'm very grateful I learned to use vim.

2

u/marcosdumay Oct 05 '18

in their terminal

Both of those have GUI frontends...

→ More replies (3)

2

u/cbbuntz Oct 05 '18

I feel crippled when editing outside of my terminal. It screws up my whole workflow. I also have a gargantuan vimrc.

→ More replies (2)

2

u/OptimisticElectron Oct 05 '18

I find it much easier on the hands and much faster using vim keybinds. From my perspective, people who use graphical text editor using mouse and keyboard to move the cursor must be very patient.

→ More replies (5)