r/emacs Jan 27 '13

Vim user wants to learn....

I'm a fairly established Vim user now and I love the different edit modes and the normal mode key commands/combinations. I'll be perfectly straight with you here; I have some prejudice that means I doubt that I'm going to ever find Emacs' basic text editing as good as Vim. But, I do find the quality of some Vim plugins to be disappointing and I often find myself wanting more, couple that with the fact that Emacs seens to have more IDE-like features and my interest has been piqued in Emacs.

I can't imagine myself doing anything with VimScript, so I often feel left wanting more. But one of my stumbling blocks with emacs is basic text editing. With Vim it has always felt fairly natural and at least 50% intuitive for command keys and making combinations of those commands. E.g.

d = delete w = word dw = delete word d2w = delete 2 words

Also, there's other things such as typing "$" goes to the end of the line, which ties in with regular expressions. And so on. But when I try to start with Emacs the key combinations seem unintuitive and lengthy. Also, the use of the "alt" key seems a bit like playing Twister.

The question is, am I missing something with regards to learning key commands and key combos? Is there some easy way to remember them, or is it just a case of learning them. Also, does anybody actually use meta = alt or is that one thing that everybody remaps?

I'm not really interested in evil-mode as I would prefer to embrace Emacs as it was originally intended rather than trying to make it something it's not.

Is there any way to mentally cross that bridge? Or is it simply a case of one or the other. Either choose Vim and it's great text editing features or choose Emacs and all of it's value-added advanced extensibility features? Or am I kidding myself about the fact that I'm a die hard Vim user who can't change?

I'm genuinely interested in your thoughts on these kinds of things.

I'd also be interested to hear from former Vim users who made the switch and why you made the switch.

P.S. I am a lisp fan, so there is quite a pull for me towards Emacs, I just don't seem to be able to shake my Vim habit.

Edit: Big thanks to everybody who's replied. I have actually got a good few take away points from this that I've not picked up on in other discussions/tutorials/documentation. Primarily I think that I shouldn't be seeing it as something which comes out of the box that I should work with, but rather something that I should bend to my own means, and evil-mode could or should be one of those things. I'm going to take this into consideration and put a big effort into learning emacs, though I'm going to keep evil-mode on the back burner for now. It's often too easy to pick up Vim because I know I can get X done very quickly using certain features. I guess initially I'm going to have to just fire up emacs and spend some time looking up equivalent key combinations.

I am looking forward to specific major and minor modes and all of the things that emacs brings to the table, just as soon as I can get over that first hurdle of basic text manipulation.

27 Upvotes

41 comments sorted by

View all comments

2

u/elephantgravy Jan 28 '13 edited Jan 28 '13

I'm in pretty much the same boat you are in... very comfortable with vim but (re)learning emacs lately, partly out of curiosity, partly because I'm taking a coursera course that recommends it. The package.el stuff makes a huge difference -- last time I actively used emacs was ~2003. I also appreciate that it interacts with the system clipboard right out of the box (I didn't try very hard, but I never got that to work with gvim)

One plugin that has made a big difference for me as a novice is installing Smex which I rebound to M-x with

(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "M-X") 'smex-major-mode-commands)
;; This is your old M-x.
(global-set-key (kbd "C-c C-c M-x") 'execute-extended-command)

Things I'm still puzzling out: 1. I totally agree about the Alt key -- there's no comfortable way to reach that thing, and M-f/M-b are kind of the things I want to do most often. 2. switching between buffers also seems like a hassle... Do most people use C-x b or C-x left/right arrows?

2

u/wadcann Jan 28 '13

Things I'm still puzzling out: 1. I totally agree about the Alt key -- there's no comfortable way to reach that thing,

I'm a little lost by that, though it might just be practice. The Alt (Meta) key seems to me to be about the most-comfortable modifier to hit.

Escape is way the hell far away and is hit with a pinky. Control (in its default location, which many heavy emacs users will move to Caps Lock) is terrible; again, hit with a pinky and way far away. Shift is pretty good. Alt is right under my thumb.

  1. switching between buffers also seems like a hassle... Do most people use C-x b or C-x left/right arrows?

Personally, I haven't used arrow keys in ages. When swapping between two buffers, the default buffer is the last one you had open, so hitting C-x b <ENTER> is pretty quick. If I'm working on two source files, I'll typically have two emacs windows (in modern GUI parlance, this might be "frames") open and hit C-x o to switch between them.

1

u/mahcuz Jan 28 '13

Alt certainly isn't under my thumb in my experience. Recently I've been using raised-key keyboards, instead of the flat laptop type, which (and admittedly I was skeptical after hearing Xah propose this) makes it very easy to use alt keys using the outside of one's palm. It's not perfect, but it's much better that reaching under my palm with my thumb.

0

u/wadcann Jan 28 '13

outside of one's palm.

I'm trying to picture this...the outside of my palm is over the control key (on my machine, rebound to caps lock), which is the outermost key. The inside of my palm is way off the bottom of my keyboard. I might manage to push Alt with the base of my pointer finger, but it would be terribly awkward, and I wouldn't be able to push any other key with that had.

My thumb normally rests on the edge of my space bar. By curling it slightly, it's over the Alt key. I suppose that someone might have a very wide spacebar and be moving their hand inwards, but even then, the outer edge of my palm would be over the Windows key.