Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Emacs is terrible

Name: Anonymous 2010-01-16 10:57

It's simply impossible to become as quick in Emacs as one might be in vim. I've been trying, I've really been trying hard to like Emacs, because I want a decent IDE for Lisp. But it's just terrible. The editor is always getting in my way.

I have a new purpose in life. To clone vim in Common Lisp. This isn't reinventing the wheel, because whatever vi-mode they have in Emacs is still corrupted. A new viitor must surface, pure and handsome, with all the Lisp-friendliness of Emacs and all the awesomeness of vi.

I just wanted to get this off my chest, /prog/.

Name: Anonymous 2010-01-17 18:39

>>37
One thing I like about Emacs is that the commands are modified in obvious ways. Take C-k, this kills a line (d$ ?). what if I want to kill a sentence? M-k. A sexp? C-M-k. Transposition is similar C-t = transpose letters, M-t is transpose words and C-M-t is transposing sexps. And emacs' modes allow for mode specific nuances without having to relearn a bunch of commands, e.g. C-j (newline-and-indent) does language specific indentation.
These are not great examples of commands you would use on a regular basis, and some are lisp-centric, which is an unfair comparison since emacs is obviously tailored to lisp (uselessly so, for 99% of developers), whereas vim is much more general purpose.

Your example of "obviousness" also makes no sense. Why does M+k kill a sentence but M+t transpose words? This is not symmetric at all. All you know about M versus C is that it's 'bigger'. How do I kill a word or transpose sentences? Killing words and transposing sentences would seem far more useful than any of the commands you mentioned; in particular, the killing n words combination in vi is probably the command I use the most doing any kind of text editing.

That being said:

kill a letter: x
kill a word: dw
kill a line: dd
kill a sentence: v(hx
kill a sexp: v%x
transpose letters: xp
transpose words: dwwP
transpose lines: ddp
transpose sentences: v(hx(p
transpose sexps: v%x%p
newline and indent (and insert mode): o<TAB>

One thing you might notice about these is that none of them are actual individual commands in Vi. They arise naturally by combining much simpler operations of navigation, selection and copy/paste. This isn't possible in Emacs because it's not modal, so every character in the above would require combining with a modifier key. They HAVE to make high-level operations to make it useful, and you have to memorize a huge amount of them, because doing the selection and copy and paste yourself with modifier keys is actually really inefficient.

This is why I find vim to be so much more versatile and useful in text editing of *any* kind, not just programming (though I mainly use it for programming in a variety of languages, and for HTML/CSS.)

Name: Anonymous 2010-01-17 18:50

>>64
Sexps in emacs do not refer to them in the lisp sense, e.g. you could use  sexp commands on C blocks delimited by {}
From the manual
The other commands deal with expressions or sexps. The word `sexp' is derived from s-expression, the ancient term for an expression in Lisp. But in Emacs, the notion of `sexp' is not limited to Lisp. It refers to an expression in whatever language your program is written in. Each programming language has its own major mode, which customizes the syntax tables so that expressions in that language count as sexps.

Sexps typically include symbols, numbers, and string constants, as well as anything contained in parentheses, brackets or braces.


Killing words would be M-d (kill-word), which would be the "super" version of delete
killing 6 words would then be M-6 M-d (or C-u 6 M-d)

newline-and-indent (C-j) is just a habit I've got into, you can use return and tab if you want.

Transpose lines is C-x C-t

Name: Anonymous 2010-01-17 18:50

Oh also, >>64-san here, and I just want to say that learning hjkl is *not* important. I've been using vim for many years and I still use the arrow keys more often than hjkl; it's just easier, and the arrow keys are just burned into my brain.

You can still always use the arrow keys in virtually all scenarios. I really don't know why all Vim tutorials emphasize hjkl so much; that is something you should learn WAY after the incredibly useful higher-level navigation commands (such as wbe%(){}), and after you learn basic copy-pasting and visual mode.

The main place I really do use hjkl is when I want to combine it with # to do something quick; e.g. to delete a block of code, v5jx . This is when you should learn these, because they're only really quicker when you combine them with numbers (or when arrow keys are actually broken, i.e. if you're stuck in a misconfigured terminal.)

Name: Anonymous 2010-01-17 18:51

>>65
newline-and-indent (C-j) is just a habit I've got into, you can use return and tab if you want.
Ah but note that the vi command o doesn't require you to be at the end of the line; it opens a new line and jumps the cursor there.

Name: Anonymous 2010-01-17 18:52

>>64
I'd also like to take issue with your "they have to use high level constructs". You could build them together from other commands if you want to, but, and I shouldn't have to tell a programmer this, it's a stupid thing to do. It's like saying that you shouldn't use high level control structures because you have conditional goto.

Name: Anonymous 2010-01-17 18:54

>>67
A fair point, I don't believe there is a built-in that does this, but I suppose I could always write one.

Name: Anonymous 2010-01-17 18:55

>>69
Scratch that, there is a command C-o, but that acts like O in vim rather than o.

Name: Anonymous 2010-01-17 19:13

>>68
I'd also like to take issue with your "they have to use high level constructs". You could build them together from other commands if you want to, but, and I shouldn't have to tell a programmer this, it's a stupid thing to do.
That's the whole point, it's a stupid thing to do *in emacs* because it's inefficient. Whereas it's extremely efficient in Vi.

Name: Anonymous 2010-01-17 19:19

In Emacs, I just press Enter for newline and indent.  If I'm at the end of a function/macro/definition/... it would just place the cursor at the start of the line, which is the behaviour one would normally want.

Name: Anonymous 2010-01-17 19:19

>>71
Even if I agree it is the `vi thing to do', why go through this every time? Why not bind your own key? Presumably you can.

It's a stupid thing to do *in emacs* because it's inefficient.
Nonsense, it's not any more inefficient than vi in the common case, since if you are doing multiple commands you would keep Control held down.

Name: Anonymous 2010-01-17 19:20

>>72
Yes, technically that's the smart thing to do. But for some reason it bothered me when I tried rebinding it and went back to C-j.

Name: Anonymous 2010-01-17 19:36

>>73
Of course you can bind your own key. You do that if it's something you do often. I can't imagine transposing words, for instance, is something you do often enough to warrant a bind; that's why you just do it naturally from lower level commands when you need it.

Name: Anonymous 2010-01-17 19:49

>>73
If you actually learned Vim I'm pretty sure you'd change in your mind.

"But you can extend Emacs to do that!" is the silliest argument you Emacsers use. If I'm going to extend Emacs to do the same stuff that Vim does I'll rather use Vim.

Name: Anonymous 2010-01-17 19:50

>>75
I've done it a number of times, but I see your point. I still think that I'd rather have it anyway for when I do need it. Having similar commands with similar bindings means that it doesn't require real effort to remember it, so I get the command for free.

Name: Anonymous 2010-01-17 19:53

>>76
You would only need to do it in the cases where emacs doesn't actually do it, it often already can. Extensibility is useful, because no one tool can do everything, or even always do it in the way you want. It's the same argument for metaprogramming, which you are probably also against.

Name: Anonymous 2010-01-17 20:01

>>76
You can extend that argument to apply to anything that has extensions(including vim) "My tool does X, I don't care if your tool can be extended to do X"

also relevant is this image from Xach, http://www.xach.com/img/lisp-and-vim.png
I think it's just part of the culture for emacsers (and lispers) to add the features they want rather than bitching about what they don't have, but I agree that it is not a compelling argument for a new user.

Name: Anonymous 2010-01-17 20:20

Why the fuck do all arguments about Emacs end up being about Lisp?

I *don't fucking care* about Lisp. Neither do 99% of developers.

Name: Anonymous 2010-01-17 20:25

>>80
Sorry to disappoint you, but OP is talking about Lisp, and most developers that develop write lisp use Emacs. I learned Emacs because I wanted to develop in CL.

P.S: I only posted in this thread once.

Name: Anonymous 2010-01-17 20:31

>>78,79
Stop trying to make this argument wider than it actually is. I'm not arguing against extensibility, nor do I hold any views against metaprogramming. I'm arguing against programming Emacs to mimic a certain style of text-editing, an idea which apparently is appealing to you. To me, it seems pointless.

Name: Anonymous 2010-01-17 20:34

>>82
I wasn't trying to mimic the style of vi (even if I did there is VIPER mode), I merely stated that if I wanted that particular function I would add it.

Name: Anonymous 2010-01-17 20:41

>>83
That's kind of an impasse, because both emacs and vi are very extensible. You might as well both write your own editor from the grounds up, and then sit and shout at each other that "if I wanted that feature I'd just write it."

Name: Anonymous 2010-01-17 20:43

>>84
Indeed, as I said earlier, vi and emacs are actually very similar. I move that we end this discussion and pick on the gedit users, who's with me ;)

Name: Anonymous 2010-01-17 20:46

Shaving keystrokes off a task the speed of which is not bound by typing is pointless.
Implying that emacs users think slower than vi users.

I really don't know why all Vim tutorials emphasize hjkl so much
It's a lot more convenient than reaching for the arrow keys, and unlike emacs, you can also operate them with one hand. Countless times I've scrolled through files with my right hand while doing something else with my left.

Name: Anonymous 2010-01-17 20:48

>>86
ASCII porn! You couldn't!

Name: Anonymous 2010-01-17 20:53

>>86
It's a lot more convenient than reaching for the arrow keys, and unlike emacs, you can also operate them with one hand.
I already said I don't mind the emacs navigation keys, but I do agree with you that vim is rather convenient in this aspect. Quite a few major modes steal this and I am happy they do.

Name: Anonymous 2010-01-18 6:10

>>56
You're an idiot. Did you maybe stop to think that Emacs commands seem hard to remember to you because you don't use Emacs enough to be enlightened?

Name: Anonymous 2010-01-18 6:25

>>89
car
cdr
emacs
apply

Name: Anonymous 2010-01-18 6:59

HAX MY ANUS
HAX IT GOOD
HAX IT NICE
HAX IT PROPER

HAX MY ANUS
HAX MY EVAL
HAX MY CAR
HAX MY CDR

Name: Sergeant Sagetank 2010-01-18 7:11

●█████▄▄▄▄▄▄▄▄
▄▅███████▅▄▃▂
███sage tank███████►
◥☼▲⊙▲⊙▲⊙▲⊙▲⊙▲☼◤

Name: Sergeant Sagetank 2010-01-18 7:14

●█████▄▄▄▄▄▄▄▄
▄▅███████▅▄▃▂
███sage tank███████►
◥☼▲⊙▲⊙▲⊙▲⊙▲⊙▲☼◤

Name: Sergeant Sagetank 2010-01-18 7:22

●█████▄▄▄▄▄▄▄▄
▄▅███████▅▄▃▂
███sage tank███████►
◥☼▲⊙▲⊙▲⊙▲⊙▲⊙▲☼◤

Name: Anonymous 2010-01-18 7:23

Hey Sergeant Sagetank, do the GIMP thread while you're at it.

Name: wise sage 2010-01-18 7:24

1000 posts

Name: Anonymous 2010-01-18 7:32

in before 1000 posts

Name: Anonymous 2010-01-18 7:37

Emacs is a programmer's tool and therefore is fair discussion in this board.

Name: Anonymous 2010-01-18 8:46

in after Vim being superior

Name: Anonymous 2010-01-18 12:32

>>53
Shaving keystrokes off a task the speed of which is not bound by typing is pointless.
Good programmers are of course bound by typing. I agree with >>86. I am very proficient in vim, and my programming productivity is still quite limited by the speed at which I can pour my thoughts into the computer. This is why I have lots of little scripts and binds to automate boilerplate and refactoring, and this is why I use vim.

And before you say it, yes, I agree that you should spend more time thinking and designing than actually coding. This time for good developers happens away from the keyboard.

If you don't find that all editors have barriers to your productivity, then you must just be a hugely unproductive programmer.

Name: Anonymous 2010-01-18 17:11

>>100
Perhaps you should learn to type.

Name: Anonymous 2010-01-18 18:58

>>101
>100 WPM isn't good enough?

Name: Anonymous 2010-01-19 0:39

>>102
No, I think that will be fine, but whatever disability has stopped you thus far may continue.

Name: Anonymous 2010-01-19 4:10

>>100
You should switch to Perl, Haskell or APL. That way every keystroke will count.

Name: Anonymous 2010-01-19 10:48

>>104
...or even FIOC where your whitespace counts, too! Joy! \o/

Name: Anonymous 2010-01-19 11:46

Whitespace doesn't really count in Joy.

Name: Anonymous 2010-01-19 15:15

>>106
The Forced Implication of Happiness

Name: Anonymous 2010-01-19 15:59

Implimentation

The word implication, doesn't make sense in that context.

Another victim of the lowest common denominator principle of public education I see. The relentless pursuit of mediocrity.

Name: Anonymous 2010-01-19 16:22

Implementation

Name: Anonymous 2010-01-19 17:18

>>108,109

<━━JOKE━━

   人     
  (__)    
  (__)   
 ( __ )    
 ( ・∀・) <━━ YOU
 (つ   つ 
 | | |     
 (__)_)


The name Joy implies that programming in the language will bring you happiness.

ILLITERACY HURTS YOU AND OTHERS

Name: Anonymous 2010-01-19 17:44

I just installed gVim on my Windows 7 install. Feels good man.

Name: Anonymous 2010-01-19 17:47

>>110
is that some kind of turd-head?

Name: Anonymous 2010-01-19 17:56

>>112
WOW PLEASE LURK 2CH MORE OK THANKS

Name: Anonymous 2010-01-19 17:59

>>112
;_;

>>111
Enjoy your aids.

Name: sensei sageru 2010-01-19 18:29

>>110
I still don't get it, maybe I should ask Kikkoman?

Name: Anonymous 2010-01-19 22:51

>>108
You can't spell "implementation"?

Name: Anonymous 2010-12-17 1:41

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

Name: Anonymous 2010-12-17 11:17

If you're an emacs user and are sitting in front of a keyboard that doesn't look like this or similar:
[C][M][space][M][C]
then you're screwed.

Unfortunately there doesn't seem to be a standard for how many control and alt buttons a keyboard should have or where they should be located.

Also you can't use control or alt as mod-key for your window manager if you're an emacs user.

Thus vim > emacs.

Name: Anonymous 2010-12-17 11:20

>>118
Super is my window manager key.

Name: Anonymous 2010-12-17 11:29

>>119
I use a happy hacking keyboard, so mod-keys are sparse.
Plus I like my mod keys to be symmetric and I have yet to find a decent keyboard that looks like [a][b][c][space][c][b][a].

Name: Anonymous 2010-12-17 11:35

>>120
I use a happy hacking keyboard
You should read Xah's blog to see how much of a faggot he (among others) thinks you are.

Name: Anonymous 2010-12-17 11:58

>>121
I bet Ωæ¶n uses a model M or space-cadet.

Name: Anonymous 2010-12-17 15:06

>>122
Since when is this thread about our favorite wife-beater?

Name: Anonymous 2010-12-17 15:13

>>23

lol msword

Name: Anonymous 2010-12-17 15:36

>>64
All those commands beginning with v could be hella optimised. Inexperienced vimmer detected.

Name: Anonymous 2011-02-04 11:58

Name: Anonymous 2011-02-04 18:02

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List