Live data from Hacker News

Emacs and Vim

martinklepsch.org

251–260 of 277 posts

Re: Emacs and Vim

#251
post #74

Earlier quoted context omitted.

> I think there are some mac-centric UX patterns that I have a hard time giving up. I can certainly understand that; I'm a relative newcomer to the platform, and while Emacs (of course) continues to behave regarding meta keys in the fashion I've spent a lifetime learning, getting used to Option-arrows for "move to next/previous word", and Command instead of Control for shortcuts, is really bothering me. (Of course, t…

If you'd like to properly remap move to next/previous word and other commands in Mac OS X, I'd recommend Karabiner (which was previously called KeyRemap4Macbook). https://pqrs.org/osx/karabiner/ I use it to map the emacs navigation keys for use across the OS, and find it really improves my experience. If you're interested in that set up, I use the following options, which are all listed under Emacs Mode: - Control +…

I use KeyRemap4Macbook for a variety of purposes, mostly related to making a PC-style USB keyboard play nicely with OS X. It doesn't go as far as I'd like, though.

Re: Emacs and Vim

#252
post #16

Earlier quoted context omitted.

I use C-{n,p,f,b} all the time, though admittedly their placement is more convenient with Dvorak. Though I also tend to use M-f and M-b a lot to navigate by words instead of characters. I also often navigate by incremental search.

The nice thing about the C-{n,p,f,b,a,e} is they work on the bash shell command line by default. So learning them is actually really useful, even outside of emacs.

That's only because emacs keybindings are the default in bash. A quick `set -o vi` will give a vimmer his or her `w` and so on.

Re: Emacs and Vim

#253
post #74

Earlier quoted context omitted.

> I think there are some mac-centric UX patterns that I have a hard time giving up. I can certainly understand that; I'm a relative newcomer to the platform, and while Emacs (of course) continues to behave regarding meta keys in the fashion I've spent a lifetime learning, getting used to Option-arrows for "move to next/previous word", and Command instead of Control for shortcuts, is really bothering me. (Of course, t…

> Command instead of Control for shortcuts Maybe I'm misunderstanding you, but it sounds like you're using one of the Mac OSX ports of emacs that tries to make emacs behave more like a Mac app. My advice is don't do that. Use emacsformacos.com [1]. It's plain ol' GNU emacs built for the Mac platform. I was so glad to find this and quickly gave up Aquamacs. I want my emacs to behave the same whether I'm on Mac or Linu…

You've misunderstood me; my Emacs is a custom-built 24.3.1 with the railwaycat patch for OS X, so it behaves exactly as I intend it to. (All of my Emacsen are hand-built; I learned back in my Perl-hacking days not to trust packagers beyond a certain level of complexity, which Emacs vastly exceeds.) The problem isn't Emacs, but rather everything else.

To expand on that point: what I'm complaining about is the fact that OS X, and native apps, use the Command key, which is where Alt would be on a PC keyboard, as the meta key for shortcuts which on a Windows or Linux box are bound to Control. This is a terrible idea from a UX perspective in general, because every common keybinding requires a hand cramp to invoke. From the special perspective of someone who remaps Caps Lock to Control, it's even worse.

I'm probably going to end up remapping Caps Lock to Command instead, and reconfiguring Emacs and iTerm accordingly; it looks like that'll work out to be a pretty complete solution to the problem. (I hadn't previously thought to check whether iTerm supports meta remapping, but it does, so I can have my Command key behave as Control when I use it in terminal applications.)

Re: Emacs and Vim

#255
post #41

Earlier quoted context omitted.

Generally you have emacs do the remoting. I use emacs in a work environment that is primarily Vim and where we end up logging in to a lot of machines to do development on, and the two things that turn heads in my emacs setups are my fluent and flexible use of multiple windows and frames, and the fact that I'm always using my local emacs and I use Tramp to remote in to the machines, so I don't have to screw around wit…

It sounds like it's only practical when you know you want to edit things in the first place, as opposed to "it doesn't work, let's restart the service in my existing SSH session and have have a look of the log" sysadmin-style-workflow.

I hate to disappoint, but it really works quite well. Not quite perfectly, but quite well (and most of the trouble I encounter comes from my use of ControlMaster on the SSH side). No, you don't any sort of weird heroics to use it.

Re: Emacs and Vim

#256
(I'm currently toying with the editor able (ql:quickload "able") (able:start), so at this moment, I'm not in a good position to figth at those thumb wars... but, as long time and happy emacs user, I need to tell the world that "little pinky" is alive and tipping, thanks)

You can have it all, emacs, and vi... so, what is the bigg fuss?

Re: Emacs and Vim

#257
post #206

Earlier quoted context omitted.

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?

One of the things that has caught me is syntax checking. I use the syntastic plugin, set to check syntax on write, and I apparently save my changes pretty frequently. Some files can take 2-3 seconds to run an external syntax checker, during which time I can't edit the file. I guess the real problem is me saving too often. Others may be trying to run a long make from vim and wanting to continue editing or looking thro…

No, that sounds like a valid usecase (and/or a horribly slow syntax check -- I'm not familiar with syntactic... does it do some kind of heuristic grammar check?).

Re: Emacs and Vim

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

Emacs isn't really just a text editor though, it's a Lisp environment whose primary use is as a text editor. It's possible to do many other things in it, so much so that it's joked about as being an operating system in its own right. Emacs is extremely good at text editing, but it's not just a text editor.

Re: Emacs and Vim

#259
post #224
post #163

Earlier quoted context omitted.

I can't find it now, but the guy running http://www.viemu.com/blog/ has a good explanation for this problem. Basically, while there are modes, you don't work like that. You are always in command mode, and you slip briefly into e.g. insert mode, before popping back out to the 'default' command mode. This perfectly described how I work in Vim, and when I passed it around my office, several people had 'ahah!' moments. Y…

http://www.viemu.com/a-why-vi-vim.html

Thank you!

Re: Emacs and Vim

#260
post #195

Earlier quoted context omitted.

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.

On my chromebook pixel, there is a super/windows key (labeled as a "search" key) where the capslock normally is on a US keyboard. Since I use super as the prefix key for all of my window manager shortcuts, I use xcape (https://github.com/alols/xcape) to allow that key to function both as super (if I hold it down) and as escape (if I tap it).

These sort of systems are a great way to remap keys; I wish such remapping was exposed by operating systems in a nice stock way.

Post reply on HN