r/programming • • Sep 24 '15

Vim Creep

http://www.norfolkwinters.com/vim-creep/
1.2k Upvotes

844 comments sorted by

View all comments

199

u/char2 Sep 25 '15

Emacs user of >10 years here: Everything about this post works just as well (conceptually) with emacs. The old ways persist for a reason. Rock on, fellow stalwarts.

278

u/davros_ Sep 25 '15

Funny, it's no longer "vim vs emacs", it's "vim & emacs vs everyone else"

27

u/TheBB Sep 25 '15

Evil and Spacemacs have now pacified everyone.

39

u/aaronsherman Sep 25 '15

Those of use who've been diehard vi and emacs users for 20+ years are glad to see that the world has caught up. :-)

→ More replies (11)

12

u/postmodest Sep 25 '15

I used [l|x]emacs from 93 to 2008, then gave up and moved to NetBeans, then gave up and moved to IntelliJ. Now I use vim for editing "files beginning with '.' or ending with 'conf'". Just because vim is every-dang-where.

...I still can't do vim bindings in bash. That's just unnatural.

5

u/dpash Sep 25 '15

Amen that that brother. Vi bindings in readline is just weird. I tried it and I just didn't like it.

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

39

u/sethamin Sep 25 '15 edited Sep 25 '15

Sure. Just with more keystrokes and a meta key.

79

u/fermion72 Sep 25 '15

I'm a Vim guy. I teach an introduction to computer science course to 300 students. Last week I suggested that they all use emacs because I figured (1) insert mode screws with beginners and ctrl-x,ctrl-c is easy to learn, and (2) it will get me to learn emacs.

I'm in emacs hell right about now -- "Okay guys, to cut/paste, do ctrl-space, then select, then ctrl-y...I mean ctrl-w. Oh, and your Macs don't automatically map the Meta key, so you have to use ESC instead, but you don't hold down ESC like ctrl..." That fact that yank means exactly the opposite in emacs and Vim is boggling. Grr.

168

u/[deleted] Sep 25 '15

I am going against my own personal feelings here, but why not just tell them to use notepad++ or an ide for whatever language they are using. For intro computer science you really don't need a good text editor, you need just the basics. Some will naturally gravitate towards them over time.

83

u/[deleted] Sep 25 '15

I concur. It is such overkill to be teaching emacs/vim in comp sci 101. Why not just let them know about the options out there?

15

u/fermion72 Sep 25 '15

Oh, we do -- we had an entire 1.5-hour extra session to just give them a taste of different editors available for their own computers. But, it's nice to have everyone on the same page (esp. in a lab setting), and I also think it is important to learn a tool that is available for virtually every computing platform ever built.

10

u/kqr Sep 25 '15

Oh, so... Vim? ;)

→ More replies (1)

20

u/myhf Sep 25 '15

Because paying teachers properly is harder than convincing teachers that their "ideology" and "passion" are rewarding. But of course the important parts of the curriculum are already decided, so if you want to communicate any of your own ideas, you'll have to limit them to trivialities like whitespace formatting and text editor choice.

28

u/DevestatingAttack Sep 25 '15

Also, by teaching these things right off the bat, another huge batch of junior programmers can immediately become useful in the burgeoning Reddit industry of arguing about tabs vs spaces! And I'm sure that there's nothing at all similar between using Vim because it's more authentic, and sporting the hipster-lumberjack look.

15

u/cittatva Sep 25 '15

:set tabstop=4 :set expandtab Or gtfo

→ More replies (3)
→ More replies (11)

16

u/Sluisifer Sep 25 '15

There's only so much mental overhead space for learning new things. Don't clog it up by doing too much at once.

One of the things I like about the Learn ____ The Hard Way stuff is that he says just use Notepad++ or equivalent. Get some syntax highlighting and that's it.

9

u/[deleted] Sep 25 '15

For me syntax highlighting is probably the most important feature for most languages. Code completion, error checking, code suggestion is nice for large projects in languages like Java, but honestly if I am whipping something up in Prolog or something small in Common Lisp, just give me syntax highlighting and I will be fine.

→ More replies (1)

11

u/fermion72 Sep 25 '15

It's a bit complicated. The server that has their files is a Linux (Red Hat) server, and we like them to work on the files via the server. So, unless we get them all set up with a local editor and teach them how to load/save files through SFTP (e.g., Notepad++ for Windows, TextWrangler for Mac, Sublime, etc.--by the way, about 90% of the students have MacBooks), we have to get them to use an editor available on the department's Red Hat system. Available editors include Vim, Emacs, Kate, GEdit, nano, etc., but the "easy" ones are graphical. Not really a problem, because they can ssh with the -X flag. That is, not a problem until they realize that the school's wireless network is feeling its age, and can get bogged down really quickly. Ever try to use X-forwarding on a slow wireless connection? It blows.

So, I decided that we'd coax them towards a non-graphical editor, and of the choices, emacs seemed reasonable. I'm learning it, and the students are learning it, and most of the time they can use emacs in windowed mode, anyway (when the connection is decent).

I'm preparing to jump into this whole "buffer" idea, but I'm a bit afraid...

15

u/[deleted] Sep 25 '15

Buffers are easy. They're basically just browser tabs before tabs existed.

7

u/Skyler827 Sep 25 '15

Why do you need them to work on the files on the server? Why can't they just run the software on their own machines, and submit to a school server when they're done? Are you teaching sysadministration or computer science?

6

u/fermion72 Sep 25 '15

It's pretty much a standardization issue. Yes, they're not doing anything that won't port to standard C++ compilers, but there are a number of headaches with getting a command-line compiler on Windows (e.g.), and I want to give individual attention to students on important things, not on "this is how you install MinGW, etc." Also, we want them to learn and be comfortable with a Linux terminal, so we have them use Linux on our server. The intermediate courses quickly go deep, and most are not Window or Mac friendly given the course material.

It is much more about the system than the editor (and of course I let them use any editor they want--I don't promise to help with support of they can't get things to work exactly). When you scale to a class of 300, you have to be judicious about your resources.

→ More replies (1)

4

u/DJTheLQ Sep 25 '15

sshfs perhaps? Means any editor on *nix can be used without special SFTP plugins. If they already know SSH then it's essentially the same thing usage-wise.

4

u/fermion72 Sep 25 '15

Yes, I've shown students sshfs before. I agree that it works well.

→ More replies (4)
→ More replies (6)
→ More replies (6)

7

u/arctander Sep 25 '15

If I may, a few things for teaching emacs:

  • The built in tutorial accessible via C-H t which works well only in 80x24 size windows :-(

  • Emacs in two pages just the first two pages of that page, not the seminar notes

Emacs is my go to editor for programming and writing a document of any significant length. Vi and it's cousin Vim, are there for anything quick and dirty. A modal editor just seems like 1979 or earlier.

The other thing that has been so darn handy with Emacs is its portability. I've run it under DOS (Lugaru Software version), VMS, Pyramid SysV, SunOS, MIPS OS, Linux, all the Unix's, Windows, Mac, and have never had to re-learn how to edit on a platform. I'm sure Vi/M is portable too these days. Anyway, its turtles all the way down.

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

4

u/vplatt Sep 25 '15

It works just as well with Eclipse. Or Visual Studio. Or IntelliJ. I know; I've used all three at various levels of keyboard-fu. But ... whatever. None of that matters. You can resort to mousing for everything and hunt and peck typing and be a better programmer than someone who spends all their time mastering an editor or IDE.

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