DEV Community

Discussion on: Anyone still using Emacs?

Collapse
 
vatrat profile image
vatrat • Edited

I had to remake an account for this, but I got this as an email. I understand that this is something you want to do, but it's important to note that this isn't a feature of vim, as was answered on stackexchange. You COULD write a function that emulated the behavior you're seeking, but it'd be a bit of a pain for a new user, and it'd most likely get in the way of other things. Mostly, though, why do you want to do this? What's the advantage of holding alt and pressing a key rather than pressing escape and then the key?

Edit: also important here, are you doing this in gui or terminal emacs?

Thread Thread
 
michaelangelozzi profile image
run_the_race

Using the Gui emacs. The reason is because the change from insert mode to insert mode is virtually seamless. After typing and say I wish to go down a line, press ALT-j and carry on. Or to type a command ALT+: One doesnt have a dead step of this key press is to change modes. Its about doing something, then doing another thing. I find it very fast and efficient. Judging by the lack of response to the question shows that it is not easy for even an experienced user. I to figure it out with maybe advice'ing a function but got no where.

Thread Thread
 
dalanicolai profile image
Daniel Nicolai

I did not know about this feature in Vim. But I have set up somehing similar in Emacs. It is just a matter of adding the keybindings. For example I use C-j/h to move the cursor left/right in insert mode (which I could as well have configured as M-j/h. And I could very easily add C-j/k to use it for scrolling from insert mode, but I have these mapped to switching buffers, see here). If you would like to map all keys in insert mode at once, then you probably should copy the normal-mode map into some meta key prefix map or something. This indeed requires some more reading (or experience). But if you get to know Emacs well, than you will see how easy it becomes.

Maybe this single thing is easier in vim, because vim is configured like that by default. But generally my experience is that Emacs is much easier, and more configurable than Vim, which is also the reason why I switched from vim to Spacemacs.