Live data from Hacker News

Emacs and Vim

martinklepsch.org

191–200 of 277 posts

Re: Emacs and Vim

#191

Gah, the tutorial keybindings! They are mad. I've been using emacs for a very long time, and I can't imagine using those to navigate. Emacs has perfectly reasonable default keybindings these days, they just aren't the ones mentioned in the tutorial. Command: move down one line What vi uses: j What the emacs tutorial suggests: C-n What I use in emacs: the down arrow

I can't imagine entering into this career or hobby and not bothering to learn how to edit text.

Re: Emacs and Vim

#192
post #40

Earlier quoted context omitted.

It's the vim defenders who will claim that the home key navigation is a must. Emacs advocates don't much care from what I've seen. Some of them will be roused to suggest that you learn to use searching better.

Vim defenders will also tell you to use search. Also, why would even Emacs fans recommended corded combos over single keypresses? Give my pinky a break man!

Real Vim Defenders™ tell you to use EasyMotion for the majority of your advanced movement needs.

In order of precedence: Standard vim movement -> EasyMotion -> Search.

Re: Emacs and Vim

#193
post #143

Earlier quoted context omitted.

So how would you envision that the Emacs OS should be structured/used?

Something like this: sudo aptitude purge emacs sudo apt-get install vim gvim gvim Edit: Clearly I'm joking. If you wanted a serious answer, Emacs is just a large, easily extensible program. It's not really an OS. That's like saying Google Chrome (contains a package manager, web browser, text editor, scripting language, and much more) is an OS.

You have heard of Chromebooks, right? It wouldn't be a far stretch to imagine a developer laptop where Emacs was the entire interface.

Re: Emacs and Vim

#194
post #158

> I completely do not understand how anyone can use Emacs’ default keybindings. I completely do not understand how switching modes is a good idea in an editor. It just doesn't fit in my brain somehow. I start typing and randomly end up pasting and cutting. I want to paste and cut it randomly types my commands in insert mode. Emacs cords are pretty intuitive to me. I don't know many: just moving, saving, creating 2 wi…

Anyone who thinks Emacs isn't modal hasn't opened a buffer on a directory.

Then closer the buffer. I've only opened it by accident. To use Vim I can't "disable" modes and only into modes by accident, I am forced to use them.

So no, emacs is not modal like Vim. But good try, good try...

Besides, why not use speedbar, that opens a nice directory browser and you can open files by clicking on them.

Re: Emacs and Vim

#195
post #88
post #82

Earlier quoted context omitted.

Remap to tab? Insanity! I remap it to Caps Lock of course.

Ah, right, I forgot what the common remap was, thought I'd get that wrong, thanks for the correction.

The more common remap is probably capslock->ctrl, for both vim and emacs users, I but I definitely prefer capslock->escape. During normal operation, my left pinky rides the gap between a and escape(aka capslock). Pressing either requires the slightest of deflections to the left or right.

I keep escape as escape as well. Capslock is absolutely worthless to me.

Re: Emacs and Vim

#196

Gah, the tutorial keybindings! They are mad. I've been using emacs for a very long time, and I can't imagine using those to navigate. Emacs has perfectly reasonable default keybindings these days, they just aren't the ones mentioned in the tutorial. Command: move down one line What vi uses: j What the emacs tutorial suggests: C-n What I use in emacs: the down arrow

I usually rest my palm naturally on the control key when using emacs (yes I use my palm to press the control key), so ctrl-n becomes just n for e.g.

Yes it's hard to get started, but once you get the hang of it navigation in emacs just becomes so painless.

Also it's hard or even impossible at first to do it on laptops but trust me you will be able to do it.

Re: Emacs and Vim

#197
post #17

Emacs+Evil is the next Vim. And yes, CtrlP is probably the thing you'll miss most. But all the other things I got from switching from Vim to Emacs+Evil easily outweigh the missing CtrlP. Vim was great, until I wanted to customize it heavily. It is simply not made to facilitate things like: child processes, SSH, understanding my code, a visual interface for Git.

I don't understand why people want to do this in Vim. To me, a text editor should be extremely good at text editing / analysis and nothing else.

I use tmux, so all the advanced functionality of the terminal is only a single keypress away (to switch to another open terminal split).

Re: Emacs and Vim

#198

Gah, the tutorial keybindings! They are mad. I've been using emacs for a very long time, and I can't imagine using those to navigate. Emacs has perfectly reasonable default keybindings these days, they just aren't the ones mentioned in the tutorial. Command: move down one line What vi uses: j What the emacs tutorial suggests: C-n What I use in emacs: the down arrow

I usually rest my palm naturally on the control key when using emacs (yes I use my palm to press the control key), so ctrl-n becomes just n for e.g. Yes it's hard to get started, but once you get the hang of it navigation in emacs just becomes so painless. Also it's hard or even impossible at first to do it on laptops but trust me you will be able to do it.

> I use my palm to press the control key

that's the old-school Starcraft way. try mapping caps-lock to control sometime, just to see, it's such wasted real-estate. nothing beats muscle memory and years of practice though.

Re: Emacs and Vim

#199
post #55
post #8

Earlier quoted context omitted.

But that means your fingers have leave home row! :(

What key do you press in Vim more often than any other? Esc! Not on the home row (although I'm sure you'll say you remap it to tab).

I haven't pressed the escape button in the past few years using vim. Do something like `imap lkj ` and `vmap lkj `. It's way nicer.

Re: Emacs and Vim

#200
post #122

Earlier quoted context omitted.

> understanding my code Both Vim and Emacs have a horrible time trying to syntax highlight Perl, but I find Vim's flaws to be more tolerable. Emacs isn't some sort of panacea.

I have written a good amount of perl in both Vim and Emacs and can't recall noticing bad syntax highlighting in either. Do you have an example?

One of the examples I seem to remember was string interpolation of things like:

  " @{[ blah() ]} "
I was never an Emacs user, but paired with Emacs users quite often during a 4 year stint at a Perl shop.

In Vim:

  my $variable = 
Vim highlights everything from "
  my $variable = function_call(
where ", $blah);" is highlighted as part of the string, when it isn't.

[edit: I tried to replicated this, and I'm not seeing the HEREDOC portion highlighted as a string, but I also notice that Perl 5.20 has removed Also in Vim:

  "text @{[ callFunction(sub { }) ]} text"
The first '}' encountered terminates the '@{' instead of parsing matching pairs.
Post reply on HN