DEV Community

Discussion on: Anyone still using Emacs?

Collapse
 
vatrat profile image
vatrat

Spacemacs here. I used neovim for a while, vim before that. I really don't like Visual Studio, I can almost feel a cubicle materializing and closing in on me. You'd think I'd like it, since I tend heavily toward the kitchen sink approach to dev environments. The crucial difference is that literally, and I cannot stress this enough, LITERALLY EVERYTHING in emacs is able to be changed. The internal structure of vim is C. The internal structure of VS is... I don't want to know. The internal structure of emacs, above a certain point, is emacs-lisp. If you don't already know, this means you can change emacs while you use it, as well as lots of other nice things like being able to "hook" into a function to make code run whenever it runs, without changing the original function at all. So, you can change and tap into the functioning of every little thing. Don't like the way this particular minuscule item works, something so small you'd have a hard time getting a developer to care? Easy, change it in less than a minute. I use evil-mode in general because I prefer vim's editing style, and Spacemacs in particular because I'm not that familiar with emacs, and the way it's set up works very well for me. In particular, helm was an incredible shock coming from vim, where I had to set up and remember every little leader key combination myself. I switched to spacemacs right around the time I was running out of space for leader key combinations on the keyboard, and looking for a way to have multiple leader keys (I didn't find one).

Now, outside of this, why emacs in particular? You can do pretty much anything and have it feel natural, like it was made to do this. Do something the first time, figure it out, optimize it so it's easy. It grows around you until you can focus on the task at hand. This style of growth, coupled with the incredible wealth of packages available for emacs, means it can do pretty much anything any IDE can. I timed a friend who uses VS on a particular task related to compilation and git integration as a test, and I was able to do it faster. In general, so much of working with normal IDEs feels so forced and structured. This menu is hard to use, has a bug, or doesn't really fit what you're doing (ex. a file prompt makes you do files one at a time)? Fuck you, that's the answer. With emacs, if there's something you can do, then you can change and automate that something for ease of use or use in a larger task to be automated.

In terms of UI, one of the best developments from emacs is the idea of major and minor modes. This allows your development environment to be adaptable and change immediately, having things like context-based settings, keybindings, behaviors, and features.

I don't see myself moving from emacs until we move to a more direct way of interfacing with computers, like direct telepathy, and even then I'd probably try to migrate emacs to that environment. It really is, as it has been called, the "editor of a lifetime". As well as an editor and IDE, I currently use it for my todo-lists (org-mode), notes, interface to google translate, calculator (I could write a whole thing like this on emacs-calc), remote environment, occasionally terminal, and more.

Collapse
 
slick3gz_ profile image
Slick3gz

Sounds like you really enjoy the Emacs experience. I also like the ability to customize the editor and just about anything else. Iā€™m still getting used to everything, but slowly starting to figure things out.

Collapse
 
vatrat profile image
vatrat • Edited

Be sure not to spend too much time at once in making everything perfect, try to use it to do actual work and fix any problems that crop up, then do extensive customization later. It's easy to see the editor as an end rather than the means to an end.

Thread Thread
 
stradicat profile image
Dennisn't šŸŽ»

As a Spacemacs user, I fully agree.

Collapse
 
michaelangelozzi profile image
run_the_race • Edited

Actually not " LITERALLY EVERYTHING in emacs is able to be changed". The first thing I tried to change (How I exit normal mode in Vim) I was told is not possible... emacs.stackexchange.com/questions/...

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.