Live data from Hacker News

Emacs and Vim

martinklepsch.org

201–210 of 277 posts

Re: Emacs and Vim

#201

I still do not undertand the devotion that people have with these text editors. I prefer Vim however I could see myself using it soley or even half the time. I feel like I know the basic commands and it is fast but with the ease of a sublime text or something similar why do people still use these pieces of software so frequently? (Not a rhetorical question)

Because UNIX shell is the most powerful integrated programming environment for development with any language/technology combination. Instead of your typical menu commands (you are lucky if you have 100 or so commands to do very basic and limited things on a selection that you must build with mouse manually) you literally have tens of thousands of extremely sophisticated commands that can easily be chained together to…

So where would you suggest going to learn all of this seemingly endless amount of information?

Re: Emacs and Vim

#202
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).

I hope you do use vim splits, since you have the same (copy/paste) buffers then.

Re: Emacs and Vim

#203
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'm not sure why you need child processes or SSH (I mean you can use vim over SSH). But have you tried syntastic for the syntax checking? And I'm not sure what kind of visual interface you want for git, bit the combination of fugitive and gitgutter (super simple but awesome) works quite well for me.

Re: Emacs and Vim

#204
post #144

Is anybody besides me still having the problem with Emacs on Mavericks where the OS X distnoted process gradually eats up gigabytes of RAM? It seems to have to do with running multiple instances of Emacs.

Yes. Frustrating bug. I ended up compiling my own, but I think the newer pretests have the fix. If you want to build your own pretest with the "Yamamoto Mitsuharu" version of Emacs (railwaycat), I posted the commands I ran: http://amitp.blogspot.com/2014/04/building-mac-os-x-emacs.ht...

Re: Emacs and Vim

#205

Earlier quoted context omitted.

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!

Because it means you don't have to jump in and out of different modes. The biggest thing that kept me from using vim was _constantly_ typing in normal mode and trying to issue commands in insert mode. Is constantly hitting the Escape key (even remapped to Caps Lock, or using ^[) really any better on your pinky?

Hm, fair complaint. At some point I found that hitting ESC immediately after typing became habitual. I find myself accidentally doing it outside of vim quite frequently. I've heard others make similar statements to yours, though. If rebinding to a different key doesn't solve it, then modal editing may not be for you.

Re: Emacs and Vim

#206

So many Emacs articles the recent days... please tell me: Should I really switch to Emacs as a web developer? Is it really superior to SublimeText and Brackets for a web dev?

It depends on how you plan your future. I've used quite a few text editors over the years (Bluefish, Scite, Homesite, Phase5, Idle, TextMate, Vim, others). I switched to Emacs more than a year ago with one clear goal: Not having to switch anymore. You see, most of the editors above (except vim) used to be good and then were deprecated, sold, stopped, and so on. Which of those has been existing for more than 20 years…

Maybe I'm a bit dense, but when are asynchronous commands a pain point in an editor? I mean, you can run eg a script that forks into the background, right? I'm not sure I really want to do "r! long-running-thing-that-updates-buffer". I can see me wanting to do "! long-running-compile &" (in the background). And I can do that in vim?

Re: Emacs and Vim

#207
Emacs + evil, sure, but please don't forget vim + slimv. I tried emacs for a bit when I was first jumping into lisp, but was also evaluating vim at the same time. After about 6 weeks I was having fun with vim. About a year later, I was really fast in vim. Fast forward another year or two, I think in vim. There are no modes or movements or searches. There's just what's in my brain and it sort of writes itself. Granted, I'll stop and think to record macros here and there, but otherwise it's all really fluid. Add the fact that I do lots of server admin to the mix, and heyyyy there's vim already there. How ya doing ol' buddy?

Then you add slimv to the mix. Honestly I never gave slime a fair shake. I barely scratched the surface. But once I got slimv up and running, I felt like I didn't need to learn emacs+slime. Maybe there are some things I don't know about that I'm missing out on, but slimv, like vim, let's me think in lisp.

So if you're a lisper and you like vim, don't jump ship yet! Give slimv a shot.

Re: Emacs and Vim

#208

Earlier quoted context omitted.

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.

Caps-lock as control is a nice but unsymmetrical mapping. If you want to avoid pain you might want to use the opposite hand to hold control while hitting a key combo. At least, this is what works best for me. I never have to twist my hand into unnatural positions.

Re: Emacs and Vim

#209

Emacs + evil, sure, but please don't forget vim + slimv. I tried emacs for a bit when I was first jumping into lisp, but was also evaluating vim at the same time. After about 6 weeks I was having fun with vim. About a year later, I was really fast in vim. Fast forward another year or two, I think in vim. There are no modes or movements or searches. There's just what's in my brain and it sort of writes itself. Granted…

I tried slimv recently and couldn't get it to work with Racket. There's a swank Racket project on github but it was extremely buggy. I also tried mit-scheme and it was buggy as well. It randomly freezes and I don't know why. (latest vim, etc.)

What do you use it for? It seems if you're using common lisp it's perfect, for everything else it works "in principle" but not really.

Re: Emacs and Vim

#210
post #195
post #88

Earlier quoted context omitted.

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.

Or use PCKeyboardhack and I forget the other plugin but on a Mac, I have a brief caps lock mapped as esc, but holding it is control. it works effortlessley.
Post reply on HN