@@brhh They're saying something to the effect of vim: An editor used by people that like to tinker with their OS and would benefit from ease of access to their shell and want to really be able to mess around with your OS. emacs: I want to write programs to run on my operating system, and I really want everything to be in one program instead of using separate ones for each type of project.
@@theTweak0284 it's more like emacs has everything inside: mail, browser, instant messaging, games, calendar, calculator, listerally almost anything you can imagine. Now it even has a window manager.
@@farlado5459 rVIl mode in Emacs is just some keyboard bindings to simulate VI on top of Emacs, to get access to Emacs and its environment. Like VI is just a visual front of ed.
@@AndersJackson evil mode is an emulation layer, but really if vim is just the wrapper for the editor, you're still /technically/ installing "vim" on top of emacs but that's just pedantry memes to justify a joke
@@kobbarikola always use spaces in place of tabs, so when others open your documents there's no discrepancy between how may spaces are in your indent versus elsewhere.
In my opinion Vim is a great option if you just want an editor and nothing else. Where Emacs shines is when you want extended functionality, which some people love. But i personally don't like a `one tool to rule them all` mindset. i prefer using an editor for editing. then other software for the rest of my workflow.
As someone who jumps between both emacs and vim I enjoyed this a lot. However, You've compared vim with "almost no plugins" to Doom emacs which is Emacs+a bunch of packages but referred to Doom emacs as "standard emacs".
You hit the nail on the head with Magit. I'm a web developer and started using Emacs just for Magit. Magit and Org mode are really the killer features of Emacs.
"gcc" evil binding for comments originated in vim, specifically in tpope/vim-commentary plugin, and it's a shortcut for "gcgc", as e.g. "gUU" is a shortcut for "gUgU", because both gc and gU are operators in vim. I don't think it's correct to say that "in vim I know of no way to do a keybinding to comment/uncomment", because the plugin above is pretty standard especially if you know how to install evil-mode for Emacs (or acitvate it in Doom) P.S. It won't remove the entire line of dashes though
True for the keybinding (because Doom is Vimmers-oriented). But the command to uncomment/comment is where Derek wants the focus to be, and that it's an Emacs built-in feature.
@@rylaczero3740 good point. How about spacemacs? Should I go for it or should I start with GNU Emacs? I have heard that the default keybindings for GNU Emacs are very cumbersome.
@@Khiladi_99, in case you chose to go with traditional Emacs bindings rather than evil-mode, don’t forget to remap your Caps Lock to act as a Control key. As far I’m concerned, that negates any discomfort around Emacs bindings.
I got to hand it to you Derek. You're really into your stuff. I usually learn something watching your vids, and I enjoy it as well as you've got a good sense of humor. I know we differ on politics but I don't watch you for that. I watch you for all your Linux knowledge and I really appreciate your vids for that. Thanks man! Well done.
what politics do u mean? i watch dt quite a while and never came a cross a video about politics besides sometimes lashing out against crazy sjw's who ruin linux. but i never heard him say hes pro trump or pro bernie etc. so what are u talking about?
@@dierealitat9485 ?Well I guess if you haven't seen it, you haven't seen it. I've seen some things that lead me to believe that politically, we differ. Like I said, I don't watch him for that and I'm not about to get into an argument with you about it either. I think Derek ( and I don't mean to talk about you in the 3rd person Derek) heard me just fine.
Luke said it himself on his website: Emacs has little purpose for people who use tiling window managers like I do. Emacs is also enormous, and for someone like me who often is in the habit of using my text editor to open just one file, it's massive overkill and a massive drain on time. My movement in my computer usage has been constantly gravitating to more and more lightweight and minimal programs, getting closer to the core of how Unix-based operating systems work, using emacs on top of things to replicate the functionality of my current setup violates this tendency. Everything I've ever needed to do, I can do perfectly well between vim and my WM. (source: lukesmith.xyz/programs.html)
@App User I have very mixed feelings about Luke Smith. On the one hand, he seems to be a genuine teacher and minimalist, on the other hand he lives in this huge house, filled up under the roof with junk, yet he keeps up this (meanwhile annoying and hardly credible) »boomer in a cabin in the woods« meme. I endorse many of his claims about minimalism and personal independence, yet the bigger picture seems to be just a meme.
@solarMan Yes, and why not? He deliberately refers to himself as a minimalist time and time again. Minimalism, to my knowledge, is about living with as little things as possible. What I see about Luke Smith is that he desperately fights to spare a single byte of memory consumption in his computer, but he lives in this house filled to the roof with junk. If he were honest, he should refer to himself as a digital minimalist at best.
Emacs has a built in package manager which simplifies package management. I tried both editors and I have to say Emacs is terrible to get going in but once you get over that initial hump... It beats Vim in almost everything.
First of all: Great video. You did a good job of taking a neutral stance and laying out the pros and cons. I'd like to say though, that one thing that gets messed up when talking about emacs and vim is the concept of built in functionality. Even this video while otherwise neutral said "if you are always adding plugins and modifying your vimrc maybe you should use emacs." But that is the wrong perspective. To a vim user vims lack of built in functions is not a drawback, it is a strength. My Vim environment reflects my needs. it has been hand crafted to fit me like a glove with the exact functionality I use and nothing I don't. Emacs lives under the "What if one person wants to play music from Emacs? We need a music player" Philosophy. Vim lives under the "start by being the best at the core functionality, and then let users add what they need from there to refine the experience." Every feature you add to a program has a cost in memory/processing power. It might not be noticable in the modern age, but its still there. Essentially it's like buying a house. Vim is buying a house that is a great house, it has a good floor plan, plenty of space. Nice yard...but you have to furnish it yourself. Emacs comes pre-furnished so you don't have to buy your couch, or a bed...but the guy who furnished it thought that every room needed its own mini fridge, and he thought the bedroom was the best place for the home gym equipment, and maybe you like treadmills but he was really into elliptical so you have elliptical(you could add a treadmil too, but you still have to figure out what you are going to do with that elliptical machine). You prefer curtains but the house has blinds. It has a hot tub which is nice, but it also has a pool, and a pond, and horses...What the heck are you going to do with all the horses? I don't need music in my development environment. As for terminal access, from inside vim I can hit ctrl-z and drop back to a terminal then type "fg" to return to vim (built in linux functionality, not specific to vim). running a shell inside an application that is already running in a shell seems silly. I will say that yes, Emacs extensibility is better than vims...but the Neovim project is working on that issue, and has already largely solved it.
"What the heck are you going to do with all the horses?" made me laugh. Having things you don't use is not as much of an issue on modern systems, as long as those things don't get in the way - but the design philosophies are just completely different, and that matters to many users.
Thank you Derek. This finally adds some clarity to the whole vim vs emacs debate, as I see it. I learned more from this video than from all "vimcon" or "emacscon" videos that are out there.
Git over ssh can be used to not need to sign into the git server on push. For vim, vim-commentary is a package for toggling comments. For vim, vim-fugitive is a package that can be used for git.
As for 'dangerous key chords' (at 5:50), I often find it best to use the Ctrl-key furthest from the letters needed in the key-combination so that I'll use both hands for key combinations. E.g., in most browsers I use the left Ctrl + L to type a url and the right Ctrl + W to close a tab. To me this solves most problems. When the Alt key is needed, I generally break that rule by using my left thumb on the left alt-key, because it allows for relaxing your other left fingers onto the standard FDSA-keys (index finger through pinky). (You basically just rest your four fingers on top of your twisted left thumb.) Finally, for far-away keys like Esc I stopped 'reaching': I no longer force my left index finger on the F whilst reaching for the Esc with my pinky finger and I let my entire left hand relax when I move my pinky toward the Esc-key (that is, with my fingers on ASDF and space, I keep my hand position the same and move the entire hand to the escape and back.) Takes a while to get used to, but definitely worth the effort if you'll spend your carreer with a keyboard.
I agree that both Vim and Emacs are very extensible. However, I think it's fair to say that Emacs is at least an order of magnitude more extensible than Vim. I don't know how to put it into words but it's as if Emacs was designed for being extended from the start. It almost feels like a design goal, in a way. Vim on the other hand, it feels as if you have to "hack" the editor into doing something it wasn't meant to, by means of vimscript. That's why things like Magit can't exist in Vim (at least with the same level of quality and power). That said, in the end I use both; Emacs with default keybindings by the way :) Emacs is for longer editing sessions while Neovim is for very quick edits, since it allows me to stay in my terminal. The fact that Emacs has to open up a GUI breaks my focus, and yes I know you can open Emacs in a TUI but I still prefer Neovim for that. Great video Derek!
The vi(1) was designed to be a visual front end to the line editor ed(1). Emacs was made to be programmable from the beginning. Macros are programs. Emacs was written 1974. You don't want the GUI? Start emacs(1) with the -nw switch. ;-) And yes, I used to learn enough vi(1) to edit the compile configuration files so I could compile Emacs. Well, with configure, that is not needed any more. :-)
@@AndersJackson Do some functionalities don't work in terminal mode since it was designed to work with a UI? One of my criterias is the only terminal IDE which can allow me to do some dev working remotely via ssh
@@aviator7479 yes, some functionality doesn't work in text terminal. Like displaying jpeg pictures or have a graphical menu, which I always turn off anyways. Except from those obviously things, no. Everything works in terminal, even over ssh(1) connections running Emacs remotely. If you work from a local graphical computer, then you can edit a file remotely over ssh(1) as it was a local file with Emacs with tramp mode. If you want to be able to display jpeg pictures in emacs and have graphical menu. If you don't care about that, run Emacs in text terminal. If the terminal support colors, then Emacs would use that too. In short, you could edit local or remote files from your local computer. Then you will have the options to run emacs locally in gui or text ui. You can run emacs remotely over ssh(1). And if you have X11, you can run remote Emacs as GUI tunneled with ssh(1) or Text UI direkt in ssh(1). Remote or local text UI worker the same, as local or remote GUI. And Emacs works equal well in both GUI and Text UI on locally and remotely computers. Try it out.
@@AndersJackson It's not helping. I choosed lunarvim for the always on terminal and being sure to be able to ssh use it. Now I am lost again on what to choose... For sure, I am still at the beguining of lunarvim but already like it. But, I don't know if I should switch to emacs. I heard the emacs implementation on ndows is not that great; For the case of a company working solely on windows.
Another tip to make emacs easier on the hands (besides evil-mode) is using god-mode, which basically changes the way to invoke M-x and C-x commands to , x for C-x and , g for M-x . I was really suffering after years of using emacs and moved to evil-mode+god-mode and it really made a difference. And as a personal preference I ended up moving away from plugins like neotree and speedbar to using helm and just searching for the file I want every time it is more efficient and it uses less screen space.
Using neovim here. Just started to incorporate it into my professional work flow, and I realize only its spellcheck feature outrules any other piece of software. You can have it spellcheck a file for multiple languages at the same time. Right now I use it to check spelling errors in English, German, and Polish (source language is English, target language is German, some words of Polish are present in the source, and they must appear in the target as well). Navigating through lines and words at the speed of keystrokes is a breeze. Never experienced anything better than this in any text editor or word processor. Digraph is celestial. You can enter complex characters with [Ctrl + k] and a sequence of two characters, for instance, e; will give you Polish ę, n? will give you Spanish ñ. No more messing around with character maps (albeit you should learn the sequences or compile a cheat sheet with your most frequently needed characters). It's pure genius. Though I love the fact that the developer of DOOM Emacs actually comments on Derek's videos here. How cool is that? I'll be sure to check it out!
I don't do a whole lot of editing config files but when I do I tend to gravitate more towards GUI editors. Geany being my favorite at the moment. I'm a little scared at the moment of vim and emacs because I'd have to learn all new key bindings. I don't think I'm quite ready for that yet but I have vim and doom-emacs installed for the waiting, Keep up the great work here Derek! I'm definitely a fan and soon to be a supporter probably.
Me, a noobie Ubuntu user: What's the deal with all this systemd hate that all the elitists users talking about?? what is even systemd? And if everyone so hate it, why (almost) every Distro has it?
Emacs does follow the Unix philosophy. It is a lisp interpreter. EVERYTHING ELSE is a collection of functions that are invoked from that lisp interpreter. So, for example, in Emacs there is one set of functions that moves the cursor. There is one set of functions that accepts input. Etc. II you want to change behavior, you don't add a plugin, you write code that is compiled, and then loaded, and called appropriately. people who are used to thinking of programs as stand-alone blocks of code miss this, but that's not the only paradigm one can write programs within. LISP machines simply had a different concept of what program is.
magit isn't built into emacs. It's a package you have to install. You can either get it through MELPA (main emacs repo) or it can be installed via an emacs distribution like spacemacs or doom emacs.
dt: "emacs and vim are two different kind of programs, emacs is much more than a text editor, while vim is a damn good text editor" also dt:"lets take a look at the history of these two text editors"
I started on emacs and I love the concept, but I did not like (1) the key chords for default emacs...terrible ergonomics (2) elisp. Viper mode was fine, but the original vim is better. I wish someone would start from scratch on an editor that looks and feels pretty much like vim by default but is actually an interpreter of a better language than elisp.
Today's developers are now all the time dealing with remoting into a VM or container where it is very much locked down so no real option to install other packages (and sudo capability may be locked down too), plus it makes no sense to even do so in an immutable container. The constancy that exist is bash, an assortment of the usual UNIX tools like find and grep - and then vi and/or vim. Never encountered such an environment yet where emacs was already installed. It pays to learn bash and vi/vim and learn them very well because they are the near universal constancy. For me, I can whip vim into shape by dropping in a .vimrc that is about 12 lines, and then am good to go (but obviously can do just fine with stock defaults too). What I absolutely admire and love vi/vim for is the ability to handle gargantuan size text files - in the era of big data, this is a tremendous asset. Plus I can easily examine binary files too by shifting into a mode to handle that. As to programming environments, I prefer to work in my language-aware IDE where there are all manner of sophisticated capabilities because of the very tight integration of the IDE and its feature set with an integrated language parser. Can't really replicate that sufficiently with the various editor plugins. These sophisticated IDE features are definitely well worth it and give the developer significant leverage to be more productive and facile.
+1! If one is frequently logging into tightly-locked VM's or a container environment, then vi/vim is all they can use to edit any file on there. Sometimes, even vi/vim might not be present there and all you might have at your disposal is nano; a few years ago when installing Arch, nano was the only option to edit files till one got to the stage of being able to run pacman and install Vim for the rest of the install. Thankfully in those cases, it was only simple edits required and nano was sufficient enough for all that. Working with hypervisors was the other such case where nano was the only editor available.
@@if-constexpr I was one time logged into a postgres container that was very lean - didn't have any editor at all, and yet I needed to change something in a text file, so used sed (had to use cat and more to preview the file to be edited - didn't have less; sort of odd sometimes what is decided to jettison)
There seems to be some confusion about Emacs, you are comparing an extensively modified Emacs to an almost vanilla Vim installation. Emacs by default have no integration with git (just like Vim) and the commenting feature is not bound to any key by default and is region based (see comment-region). Considering that Emacs can be run in the terminal (emacs -nw) and Vim can be run as a GUI (gvim) they should be equivalent in that regard. Great video otherwise!
It's true that comparing a fully configured Emacs to vanilla Vim is kind of an false equivalency. But Emacs does bind commenting by default to "M-;" and a bunch of variations. And there is VCS integration that also support git, but it's a far cry of magit.
> There seems to be some confusion about Emacs, you are comparing an extensively modified Emacs to an almost vanilla Vim I agree, there is no comparison with Emacs and Vim.
He is comparing them the way He uses them, and the way they are meant to be used. Emacs doesnt ship with a whole lisp for Nothing. It's meant to be extended. It's an ecosystem, not a Single Software. Vim is a Text Editor. It's editing System is superior to everything else, but thats why most people Use doom / evil. Emacs for me just doesnt have any Benefit over vscode with vscodevim. But the point is: emacs' package ecosystem is a core Part of how emacs should be used. Vim is meant to be very usable without Modification. And it does that well
I also use GNU Emacs without the gui. It is great that it is available as gui, but you can also write "emacs -nw" and run Emacs in the console. I am a writer and book editor. I use GNU Emacs with the AUCTeX plugin, and write in LaTeX to edit books and articles. Now I use Spacemacs, which is awesome. However, since I only learned Emacs, I got used to its keybindings. I will learn Vim's some time.
Generally, I already have an OS, so vim is all I need. I can't really understand why one would mix up an operating system with an editor. Why complicate things?
Hi DT and all! Very nice and fair comparision. I don't use emacs so far, but there are several ways to put comments in Vim besides using Visual mode. The # might be the comment-sign. 1. I# (inserts a # at the beginning of the current line) ...for each following line do: j. (the dot-command repeats the last action - very powerful) 2. Write a macro in register a: qa I#q ...now go down one line with j and then play the macro: @a 3. Most elegant and powerful option: combine command-line-mode and normal mode (assuming you have 5 lines of code) :1,5 normal I; (:[range] command, % stands for the whole file). So - guess, what :% normal I does and :% normal A does ;) And you don't even have to type second out - press uparrow-key in cmd-mode to bring back last sequence. That is the power of vim. Love to do my config-files and tex-style with it. :))
A very balanced review of one of the oldest flame-wars. I was going to say that if you quickly want to edit a file from the terminal, then VIM is your guy but nowadays I run a shell within Doom-Emacs.
23:01 Presumably you are backgrounding the command so it doesn’t block waiting for Emacs to close the window. Another way is to add the “-n” option to emacsclient. That tells it to exit immediately, without waiting for the window to be closed.
I personally like doom and the command mode that I am so used to from Vim. I just wish it had fuzzy search or code completion like vim. I tried spacemacs and it seemed similar to spacevim.
Emacs was very popular on our VT52 terminals because it would journal, so when the DEC TOPS-20 computer cluster would crash with "Tops System 20 is not running" we wouldn't have lost all of our editing session.
To compare a full blown configuration framework for GNU Emacs with a clean Vim is a bit unfair, isn't? :) Perhaps would be fairer to compare it with a full blown configuration framework for Vim...
What I think there are not a lot people who think out of box vim is unusable so not a lot people use plugins I didn't know about vim plugins for about 6 months of using it but incase of emacs many think default keybindings are cr@p so they pretty much install extensions as a necessity.
Regarding emoji support: I had a similar feeling as to not really seeing a need for them in my editor until I realized that unicode support is very useful for languages that use it display it's characters, like Japanese, Chinese, Lakota and such.
Commenting works on vim with this plugin: tpope/vim-commentary But maybe doom emacs commenting is better (?) Anyway thanks for taking time to make this comparison. Insightful.
Emacs is better in MANY other ways, not just those. The thing that vim(1) has for it is that the key binding are also good and it is faster then Emacs to start, because it doesn't have a true GUI mode. Please try my settings for Emacs lisp that I have written in Org-mode.
Obviously it's ed: the official text editor For real though, whichever editor isn't gonna get in your way and let you get stuff done. If somebody is faster writing code in geany, so be it. The last thing we'd want to do is shove either vim, neovim, emacs, doom emacs, spacemacs, joe, _that editor_ (bisqwit's thing), etc without knowing what they're getting themselves into and forever be discouraged from ever using them again.
I think it's a great video presentation of these two big softwares! I liked that you mentioned their story and then their differences. Through your examples showing the orientation of each tool. I like that you mention and refer that Emacs is more than just a text editor! P.S. : Anyway I think it would be very nice and interesting a video to show how (possibly with plugins/extensions) you can make VIM much more powerful and look like an IDE or Emacs .. ;-) Thank you! :-)
Thank you, Derek. I cannot get into either for literary or translation work. Tabbed and tiled instances of Gedit works great for me. Except for being able to export footnotes to LibreOffice in a convenient manner. But enjoy both and either.
I haven't used Vim (used to be stuck with vi before there were options), but I can't imagine a better Lisp editor than emacs. As to the danger of the default emacs key bindings, I just remapped the caps lock key so I don't have to stretch my pinky. Why we even have a caps lock key today is a mystery.
I can affirm that magit is a killer feature I can't live without. It is so easy to do line-wise review and commit using magit whilst for command line tool, it would be sooooo complicated
I think Emacs is like a web browser as now we run various of web applications on the browser. The primary purpose of JavaScript was to handle DOM in HTML. Emacs LISP was to handle text in buffer. Both can run the language to run many application using HTML (web browser) or text as a user interface.
They're both great programs. I use vim, and am still a beginner with emacs. I enjoy both, and each of them frustrates me sometimes. Though, out of the box, vi is installed by default on almost every *nix installation, and a workable cheat sheet is less than a page long. Emacs has a real and formal programming language, elisp. With elisp, one can extend emacs in almost infinite ways. It has built in shells, an organizer, and games, out of the box, just for starters. It's nearly its own operating environment.
One thing I like to do is keep Emacs running all the time. Then when I navigate to a file I want to edit, I use the “emacsclient” command to send that filename to Emacs to open.
My impressions from trying it out a bit were that I liked the design of its modal editing, but not how often modifier keys have to be used, and that the ecosystem is unsurprisingly sparse and unpolished.
Many others here have shared a few vim plugins for toggling comments. I just wanted to underscore that vim itself has no problem displaying emojis. It has to do with if your terminal support s emoji or not. For example, gnome-terminal and tilix have no problem. But urxvt? Not so much. (Edit: As I was typing this, you just mentioned it's the terminal that is the deciding factor.)
Emacs is following the Unix philosophy. Emacs is a placeholder for programs. They could text editors, browsers music players or actually anything. Saying emacs is not following the Unix philosophy is like saying manjaro isnot following the Unix philosophy because it has a terminal, a browser and other stuff.
Vim mastered keyboard navigation, before moving to emacs I used vim plugins in every editor I’ve ever used. I started with spacemacs which has evil mode package installed by default. Also a good protein is to swap caps lock for ctrl, helps with general use of control which you can’t avoid even with vim
regarding the comment toggle I believe what provides you with functionality in Emacs is evil-commentary plugin which is in fact re-implementation of vim's plugin called toggle_comment. So in fact neither Emacs nor vim has this build in but both has plugin for it. Generally Doom Emacs has a ton of plugins. I think you should either compare Doom/Spacemacs with spf13/janus or just plain emacs with plain vim otherwise it will be very hard even for you and even more so for people watching the video to distinguish between plugins and build in functions.
Nice intro and comparison but... You are comparing a more or less vanilla Vim to a heavily modified Emacs pre-bundled with some very high quality plug-ins that are *not* built in to the editor. Magit is certainly not built in to Emacs. Mu4e is not built in to Emacs. Ivy (the completion lists that pop up in the bottom) is not built in to Emacs. And as others have mentioned, Doom comes bundled with a lot of plug-ins that are actually ports of Vim plugins. I'm a long time Vim user but using Emacs more and more now (Org-mode was the feature that really sold me), so I'm not trying to put down Emacs, just don't want people to be disappointed if they install a vanilla Emacs and expect to see all this working out of the box.
I thinks that this is an Unfair Review. Vim as you says is an extendable Text Editor, This amazing piece of software gives the possibility of use it as a simple Text Editor or a Full IDE with no more than 6 Plugins. Emacs, as you said, is already bloat it.
Vim user here, trying to get comportable with emacs as well for a couple of months so far. I've started with doom and then tried spacemacs. Both are great. Emacs is wonderful. I like almost everything of it but I've a problem that frequently keeps me switching back to vim. Slowness. In certain cases emacs (not talking about vanilla emacs because I'm not able at the moment to create my own configuration) is realy really slow compared to vim, specially in autocompletion, undoing changed and loading files(large ones). I hope to find a way to solve these issues and hopefully an alternative to company-mode that seems to be the most slow thing in my experience.
My current goal is to master Vim + Dvorak. One day I may try Emacs as well but I don't feel the need for it right now. I am kinda new to Vim, I've been using it for about 1 year so far and I am pretty happy with it.
vim + dvorak sounds like a recipe for breaking your keyboard. Man is not meant for those speeds! Seriously, if you're a math student you could easily take notes in production quality Latex with that setup.
Doom-Emacs is not a vanilla emacs, so the comparison is not totally fair. You say that emacs commenting and git support are out of the box , but those are actually packages. For the same purpose, vim has t-commenter for comments, fugitive for git, ctrlp for file opening (and that handles mru files, buffer switching etc...). With the plugins and packages those 2 are very close, and I personally love both for their own rights. Emcas vanilla is a different experience, but looking at alternate packages can help with workflow. Helm vs. Ivy, or even ido etc. Despite using vim the most, I prefer the extensibility of emacs because of emacs-lisp.
I'm trying to migrate from vim to emacs and it has not been smooth, for a couple of times I really wanted to give up. Maybe I was wrong in the first place to try to replicate as much of my vim workflow as possible over to emacs, rather than learning and adopting to the native emacs ways (that doesn't apply to the evil-mode of cause, the emacs keybindings are insane). I'm currently struggling to make company (a word completion package) to work with yasnippet (snippet/template expansion package) by binding both to the TAB key. The lisp synax is also so weird and I'm having a hard time reading solutions people posted online.
Good information. I heard that Digital Equipment Corperation's TPU and EDT was written in emacs. EDT is my favorite text editor. Unfortunately it is licensed for VMS only, and I don't think HP is willing to give up the code for TPU. I think for audio samples, you should record your trombone. LOL
No they weren’t. Switching from TECO/VTED, I found EDT pretty horrible. TPU was better, and I had fun customizing it, but its regex searches had limitations (fixed in later versions). By the way, the earliest versions of Emacs were written in TECO. If you don’t know what that is, imagine what the random characters that appeared on your screen looked like, if your terminal was connected to a serial line at the wrong speed. ;)
While I'd like to try EMACS, there's a few things I don't like about it. Firstly, GNU Emacs (which seems to be the most common distribution these days) was stolen from the James Gosling version of EMACS. From what I understand, James Gosling could no longer maintain EMACS, so he asked around for people who would like to take over, but since nobody else could take the project it was sold to UniPress. Richard Stallman was not happy about this, I believe because a few other people had made contributions to the editor, and him being very stubborn on his copyleft philosophy, he stole the source code and released it as GNU Emacs. Suddenly, with UniPress being a dying company, they find IBM and DEC distributing their software for free. They decided to sue IBM and DEC, but Richard Stallman was never targetted, because he was homeless at the time (RMS had weird views on economic models at the time, he was more or less living at MIT). Of course, they won the lawsuit, the code matched line for line, and RMS even forgot to remove the copyright notices. I believe IBM and DEC got fined, but GNU Emacs from this point on took on it's own life. Which brings me to my next point. Secondly, GNU Emacs is not really a text editor. As GNU Emacs took on it's own sort of identity, RMS turned it in to a LISP processor, more than a text editor. Now GNU Emacs serves as an extensible productivity suite, but the text editor is lacking, and so many people emulate VIM within Emacs. I mean, EMACS stands for "Editor MACroS", but the macros is GNU Emacs are slow and inefficient, many times you have to resort to using a LISP evaluation, and even then it's still lacking in comparison to traditional EMACS. Another problem is that the extensibility breaks the UNIX principle, where now you're replacing all your programs with a so-so Emacs addon, instead of my dedicated programs. All I want out of EMACS is a text editor. But especially GNU Emacs is slow and inefficient, and the keybindings are oftenly criticized. And finally, with RMS having taken over EMACS, it now falls under the GPL license. Overall, I don't like GPL licensed software for essential software that I use, such as a text editor. Copyleft works well in many places, but I have my disagreements with the licensing, especially some of the changes in GPL licensing. While I have gotten used to editing with vi-like editors, I don't really like VIM all that much, it feels messy, and I feel like it misses the point of vi. And while it makes for a better text editor, the configuration feels cluttered, especially when working with plugins. Neovim makes this better with Lua, it is tied to a very long history and still feels like a mess at times. Perhaps I'll give uEmacs a shot, there is an editor called mg (previously called MicroGNUEmacs, but changed by the request of RMS) which is uEmacs with bindings that are more familiar to GNU Emacs users (it is not affiliated with GNU). It is also public domain, and currently maintained by the OpenBSD team. Or perhaps I'll try a more vanilla uEmacs if I don't plan to learn GNU Emacs bindings, Linus Torvalds uses uEmacs and it seems as though there are patches available for it. Dired looks like a nice feature though, and it is included in mg, but I'm not sure about uEmacs. Or maybe I'll try Kakoune, or a similar vi-like editor.
Words from the technical pov after 100k+ vim script and 10 years' plugin writing, vim has the strongest friend python that is seldom mentioned. This is what make vim not only the most editor but also the strongest operation system.Go through the python and vim help, then it maybe not that blurry.
The king of cryptic text editing was, and remains, Teco, which is still available for several platforms. Emacs was originally written in Teco, and Vi/Vim are shameless plagiarisms of the Teco command interface. Teco was written by Dan Murphy on the Digital Equipment PDP-1 computer in 1962-63. The PDP-10 series computers in the late 1970's (the one Bill Gates used to create MBasic) came with a huge security vulnerability - Teco could be used to 'phish' user logins/passwords from the text mode terminal login prompts because it was the only user runnable program other than LOGIN with privileged instruction permission to the SETLCH instruction (by being started under the system user [1,2]). SETLCH allowed LOGIN to turn off terminal echo for the purpose of receiving a password. One could therefore also emulate a login prompt in Teco, receive the login/password keystrokes, save them to a file and then reply with ?INVALID ENTRY - TRY AGAIN # before immediately logging out of Teco and your own account directly to a (real) login prompt.
There is a fantastic Git client plugin for Neovim called gina.vim. It may also work with Vim 8+, but honestly if you're still using standard Vim you ought to consider switching to Neovim. gina.vim is a lot like Magit for Emacs, which I imagine served as the inspiration for it.
I've heard it described as:
vim: my operating system is my development environment.
emacs: my development environment is my operating system.
the only way I can understand this is by using them. I can't understand this lol
@@brhh They're saying something to the effect of
vim: An editor used by people that like to tinker with their OS and would benefit from ease of access to their shell and want to really be able to mess around with your OS.
emacs: I want to write programs to run on my operating system, and I really want everything to be in one program instead of using separate ones for each type of project.
@@theTweak0284 it's more like emacs has everything inside: mail, browser, instant messaging, games, calendar, calculator, listerally almost anything you can imagine. Now it even has a window manager.
vim: my operating system is my development environment.
thats the most apt way i have heard it
@@Muetsii bruh, sounds kinda like bloat, honest question but why would you want that ?
Vim is a text editor, Emacs has a text editor
EMACS is for vim users that would like to push one extra meta key to get the same stuff done.
Emacs is an editor. It doesn’t just edit text. I’ve used it to patch binaries, too.
Emacs doesn't even have a *good* text editor, you end up installing Vim on top of it.
@@farlado5459 rVIl mode in Emacs is just some keyboard bindings to simulate VI on top of Emacs, to get access to Emacs and its environment.
Like VI is just a visual front of ed.
@@AndersJackson evil mode is an emulation layer, but really if vim is just the wrapper for the editor, you're still /technically/ installing "vim" on top of emacs
but that's just pedantry memes to justify a joke
Right, that's Vim vs Emacs sorted. Whats next Derek? ..bringing peace to the middle east?
Space vs Tabs
@@kobbarikola Space is a need, Tab is a necessity
@@RP-kr2mg WHAT? Take your tabs and go away 😋.
Sab changa si!
@@kobbarikola always use spaces in place of tabs, so when others open your documents there's no discrepancy between how may spaces are in your indent versus elsewhere.
In my opinion Vim is a great option if you just want an editor and nothing else.
Where Emacs shines is when you want extended functionality, which some people love. But i personally don't like a `one tool to rule them all` mindset. i prefer using an editor for editing. then other software for the rest of my workflow.
We are like minded on that!!!
As someone who jumps between both emacs and vim I enjoyed this a lot. However, You've compared vim with "almost no plugins" to Doom emacs which is Emacs+a bunch of packages but referred to Doom emacs as "standard emacs".
I had to look up "Doom EMACS" because my head brought up a mod for GZDoom that essentially is just an EMACS text editor... >.>'
now i really want to know if emacs can run doom....
edit: yes it can! via EAF
@@joshuastein1888 (bit late) ofcourse it can, its a turing complete language haha, still fun though
we need a vim fork thats just vim + all tpope plugins, call it tvim or tpvim or something
@@ratofthecity6351 you mean NvChad, AstroNvim, LunarVim
You hit the nail on the head with Magit. I'm a web developer and started using Emacs just for Magit. Magit and Org mode are really the killer features of Emacs.
"gcc" evil binding for comments originated in vim, specifically in tpope/vim-commentary plugin, and it's a shortcut for "gcgc", as e.g. "gUU" is a shortcut for "gUgU", because both gc and gU are operators in vim. I don't think it's correct to say that "in vim I know of no way to do a keybinding to comment/uncomment", because the plugin above is pretty standard especially if you know how to install evil-mode for Emacs (or acitvate it in Doom)
P.S. It won't remove the entire line of dashes though
Andrey Cherkasov exactly. Nerdtree is a vim extension too.
Yep, you're perfectly right!
@@chazdii right!
True for the keybinding (because Doom is Vimmers-oriented). But the command to uncomment/comment is where Derek wants the focus to be, and that it's an Emacs built-in feature.
@@leonamer4054 lol, your comment made my day 😂
I am not surprised that someone has not made a distro that only uses Emacs as it interface
And that seems like a fun project
Guix
Seems like dt is doing now with dtos
I've heard the saying: "Vim is the god of editors, Emacs is the editor for gods"
Original (Chinese): 「Vim是編輯器之神,Emacs是神之編輯器」。
Ha ha. I have been using Vim for more than 10 years. Today I am learning emacs. lol.
@@sortof3337 I have used neither and was wondering which one to start with. Any suggestions?
@@Khiladi_99 Start with emacs. At end of day, plugins are all that matter and emacs is unbeatable in that area.
@@rylaczero3740 good point. How about spacemacs? Should I go for it or should I start with GNU Emacs? I have heard that the default keybindings for GNU Emacs are very cumbersome.
@@Khiladi_99, in case you chose to go with traditional Emacs bindings rather than evil-mode, don’t forget to remap your Caps Lock to act as a Control key. As far I’m concerned, that negates any discomfort around Emacs bindings.
Me, entering ":" in vim:
* angels singing * "Is this it?"
Me, entering "q":
"After all these years"
This is criminally underrated
Then pressing backspace and then 'e'
@@sykocode8530
*I’m an angel with a shotgun*
E37: No write since last change (add ! to override)
It took me forever to figure that out. try vimtutor, it changed my life.
I got to hand it to you Derek. You're really into your stuff. I usually learn something watching your vids, and I enjoy it as well as you've got a good sense of humor. I know we differ on politics but I don't watch you for that. I watch you for all your Linux knowledge and I really appreciate your vids for that. Thanks man! Well done.
what politics do u mean? i watch dt quite a while and never came a cross a video about politics besides sometimes lashing out against crazy sjw's who ruin linux. but i never heard him say hes pro trump or pro bernie etc. so what are u talking about?
@@dierealitat9485 ?Well I guess if you haven't seen it, you haven't seen it. I've seen some things that lead me to believe that politically, we differ. Like I said, I don't watch him for that and I'm not about to get into an argument with you about it either. I think Derek ( and I don't mean to talk about you in the 3rd person Derek) heard me just fine.
I just use emacs for Tetris
Now the only thing that remains is to convince Luke Smith try emacs....
Luke said it himself on his website:
Emacs has little purpose for people who use tiling window managers like I do. Emacs is also enormous, and for someone like me who often is in the habit of using my text editor to open just one file, it's massive overkill and a massive drain on time. My movement in my computer usage has been constantly gravitating to more and more lightweight and minimal programs, getting closer to the core of how Unix-based operating systems work, using emacs on top of things to replicate the functionality of my current setup violates this tendency. Everything I've ever needed to do, I can do perfectly well between vim and my WM.
(source: lukesmith.xyz/programs.html)
@App User I have very mixed feelings about Luke Smith. On the one hand, he seems to be a genuine teacher and minimalist, on the other hand he lives in this huge house, filled up under the roof with junk, yet he keeps up this (meanwhile annoying and hardly credible) »boomer in a cabin in the woods« meme.
I endorse many of his claims about minimalism and personal independence, yet the bigger picture seems to be just a meme.
@solarMan Yes, and why not? He deliberately refers to himself as a minimalist time and time again. Minimalism, to my knowledge, is about living with as little things as possible.
What I see about Luke Smith is that he desperately fights to spare a single byte of memory consumption in his computer, but he lives in this house filled to the roof with junk.
If he were honest, he should refer to himself as a digital minimalist at best.
@@marioschroers7318 is it junk? If so give vid showing junk.
@@popspy7665 Basically any video showcasing his living room or his garage in the background. I'm positive you'll be able to look it up yourself.
Emacs has a built in package manager which simplifies package management. I tried both editors and I have to say Emacs is terrible to get going in but once you get over that initial hump... It beats Vim in almost everything.
First of all: Great video. You did a good job of taking a neutral stance and laying out the pros and cons.
I'd like to say though, that one thing that gets messed up when talking about emacs and vim is the concept of built in functionality. Even this video while otherwise neutral said "if you are always adding plugins and modifying your vimrc maybe you should use emacs." But that is the wrong perspective. To a vim user vims lack of built in functions is not a drawback, it is a strength. My Vim environment reflects my needs. it has been hand crafted to fit me like a glove with the exact functionality I use and nothing I don't. Emacs lives under the "What if one person wants to play music from Emacs? We need a music player" Philosophy. Vim lives under the "start by being the best at the core functionality, and then let users add what they need from there to refine the experience." Every feature you add to a program has a cost in memory/processing power. It might not be noticable in the modern age, but its still there.
Essentially it's like buying a house. Vim is buying a house that is a great house, it has a good floor plan, plenty of space. Nice yard...but you have to furnish it yourself. Emacs comes pre-furnished so you don't have to buy your couch, or a bed...but the guy who furnished it thought that every room needed its own mini fridge, and he thought the bedroom was the best place for the home gym equipment, and maybe you like treadmills but he was really into elliptical so you have elliptical(you could add a treadmil too, but you still have to figure out what you are going to do with that elliptical machine). You prefer curtains but the house has blinds. It has a hot tub which is nice, but it also has a pool, and a pond, and horses...What the heck are you going to do with all the horses?
I don't need music in my development environment. As for terminal access, from inside vim I can hit ctrl-z and drop back to a terminal then type "fg" to return to vim (built in linux functionality, not specific to vim). running a shell inside an application that is already running in a shell seems silly.
I will say that yes, Emacs extensibility is better than vims...but the Neovim project is working on that issue, and has already largely solved it.
Very good for your explanation, I liked ctrl-z and fg. Thanks
"What the heck are you going to do with all the horses?" made me laugh. Having things you don't use is not as much of an issue on modern systems, as long as those things don't get in the way - but the design philosophies are just completely different, and that matters to many users.
thanks for tips :D Im new in vim.
any suggestions for your learning?
vim 8.x support terminal access
This is actually a nice comment.
Thank you Derek. This finally adds some clarity to the whole vim vs emacs debate, as I see it. I learned more from this video than from all "vimcon" or "emacscon" videos that are out there.
Git over ssh can be used to not need to sign into the git server on push.
For vim, vim-commentary is a package for toggling comments.
For vim, vim-fugitive is a package that can be used for git.
As for 'dangerous key chords' (at 5:50), I often find it best to use the Ctrl-key furthest from the letters needed in the key-combination so that I'll use both hands for key combinations. E.g., in most browsers I use the left Ctrl + L to type a url and the right Ctrl + W to close a tab. To me this solves most problems. When the Alt key is needed, I generally break that rule by using my left thumb on the left alt-key, because it allows for relaxing your other left fingers onto the standard FDSA-keys (index finger through pinky). (You basically just rest your four fingers on top of your twisted left thumb.) Finally, for far-away keys like Esc I stopped 'reaching': I no longer force my left index finger on the F whilst reaching for the Esc with my pinky finger and I let my entire left hand relax when I move my pinky toward the Esc-key (that is, with my fingers on ASDF and space, I keep my hand position the same and move the entire hand to the escape and back.) Takes a while to get used to, but definitely worth the effort if you'll spend your carreer with a keyboard.
I agree that both Vim and Emacs are very extensible. However, I think it's fair to say that Emacs is at least an order of magnitude more extensible than Vim.
I don't know how to put it into words but it's as if Emacs was designed for being extended from the start. It almost feels like a design goal, in a way. Vim on the other hand, it feels as if you have to "hack" the editor into doing something it wasn't meant to, by means of vimscript. That's why things like Magit can't exist in Vim (at least with the same level of quality and power).
That said, in the end I use both; Emacs with default keybindings by the way :)
Emacs is for longer editing sessions while Neovim is for very quick edits, since it allows me to stay in my terminal. The fact that Emacs has to open up a GUI breaks my focus, and yes I know you can open Emacs in a TUI but I still prefer Neovim for that.
Great video Derek!
The vi(1) was designed to be a visual front end to the line editor ed(1).
Emacs was made to be programmable from the beginning. Macros are programs. Emacs was written 1974.
You don't want the GUI? Start emacs(1) with the -nw switch. ;-)
And yes, I used to learn enough vi(1) to edit the compile configuration files so I could compile Emacs. Well, with configure, that is not needed any more. :-)
Yes, early emacs visionaries were really something.
@@AndersJackson Do some functionalities don't work in terminal mode since it was designed to work with a UI? One of my criterias is the only terminal IDE which can allow me to do some dev working remotely via ssh
@@aviator7479 yes, some functionality doesn't work in text terminal. Like displaying jpeg pictures or have a graphical menu, which I always turn off anyways.
Except from those obviously things, no. Everything works in terminal, even over ssh(1) connections running Emacs remotely.
If you work from a local graphical computer, then you can edit a file remotely over ssh(1) as it was a local file with Emacs with tramp mode. If you want to be able to display jpeg pictures in emacs and have graphical menu.
If you don't care about that, run Emacs in text terminal. If the terminal support colors, then Emacs would use that too.
In short, you could edit local or remote files from your local computer. Then you will have the options to run emacs locally in gui or text ui.
You can run emacs remotely over ssh(1). And if you have X11, you can run remote Emacs as GUI tunneled with ssh(1) or Text UI direkt in ssh(1).
Remote or local text UI worker the same, as local or remote GUI.
And Emacs works equal well in both GUI and Text UI on locally and remotely computers.
Try it out.
@@AndersJackson It's not helping. I choosed lunarvim for the always on terminal and being sure to be able to ssh use it. Now I am lost again on what to choose... For sure, I am still at the beguining of lunarvim but already like it. But, I don't know if I should switch to emacs. I heard the emacs implementation on ndows is not that great; For the case of a company working solely on windows.
Emacs isn't a text editor. It's an operating system in itself haha.
Transposer dotpy but why???
@Transposer dotpy You can replace systemd with Emacs...
…that unfortunately lacks a decent text editor 😂
@Transposer dotpy bloat
Demian Terentev not with evio mode (vim emulator)
Another tip to make emacs easier on the hands (besides evil-mode) is using god-mode, which basically changes the way to invoke M-x and C-x commands to , x for C-x and , g for M-x . I was really suffering after years of using emacs and moved to evil-mode+god-mode and it really made a difference.
And as a personal preference I ended up moving away from plugins like neotree and speedbar to using helm and just searching for the file I want every time it is more efficient and it uses less screen space.
Evil mode. I love that.
RMS used to say that VIVIVI is the editor of the beast.
Using neovim here. Just started to incorporate it into my professional work flow, and I realize only its spellcheck feature outrules any other piece of software.
You can have it spellcheck a file for multiple languages at the same time. Right now I use it to check spelling errors in English, German, and Polish (source language is English, target language is German, some words of Polish are present in the source, and they must appear in the target as well).
Navigating through lines and words at the speed of keystrokes is a breeze. Never experienced anything better than this in any text editor or word processor.
Digraph is celestial. You can enter complex characters with [Ctrl + k] and a sequence of two characters, for instance, e; will give you Polish ę, n? will give you Spanish ñ. No more messing around with character maps (albeit you should learn the sequences or compile a cheat sheet with your most frequently needed characters). It's pure genius.
Though I love the fact that the developer of DOOM Emacs actually comments on Derek's videos here. How cool is that?
I'll be sure to check it out!
I don't do a whole lot of editing config files but when I do I tend to gravitate more towards GUI editors. Geany being my favorite at the moment. I'm a little scared at the moment of vim and emacs because I'd have to learn all new key bindings. I don't think I'm quite ready for that yet but I have vim and doom-emacs installed for the waiting, Keep up the great work here Derek! I'm definitely a fan and soon to be a supporter probably.
The best editor is an editor that makes you comfortable and productive. It's a particular taste of each one, I guess.
Replace systemd with emacs !
😂
You can! System E
github.com/a-schaefers/systemE
Everything is better then systemd, even emacs. :3
@@feuerundwasser282 I don't know about all tat ! Lol. systemd has a ton of good features
Me, a noobie Ubuntu user:
What's the deal with all this systemd hate that all the elitists users talking about??
what is even systemd? And if everyone so hate it, why (almost) every Distro has it?
Before I watch the video, I'm gonna guess the answer is: Personal Preference
Actually, the correct answer is Vim.
Actually, the correct answer is Emacs.
Actually, the correct answer is 42
Emacs Makes A Computer Slow.
Vim Is Monstrous.
(Vim's so bad u have to google how to exit it.)
The Correct answer is pen and Paper
Emacs does follow the Unix philosophy. It is a lisp interpreter. EVERYTHING ELSE is a collection of functions that are invoked from that lisp interpreter. So, for example, in Emacs there is one set of functions that moves the cursor. There is one set of functions that accepts input. Etc. II you want to change behavior, you don't add a plugin, you write code that is compiled, and then loaded, and called appropriately.
people who are used to thinking of programs as stand-alone blocks of code miss this, but that's not the only paradigm one can write programs within. LISP machines simply had a different concept of what program is.
magit isn't built into emacs. It's a package you have to install. You can either get it through MELPA (main emacs repo) or it can be installed via an emacs distribution like spacemacs or doom emacs.
vc is the built in support for git and other version control systems
This video was bound to come some time
dt: "emacs and vim are two different kind of programs, emacs is much more than a text editor, while vim is a damn good text editor"
also dt:"lets take a look at the history of these two text editors"
Its like comparing an operating system with an text editor
I started on emacs and I love the concept, but I did not like (1) the key chords for default emacs...terrible ergonomics (2) elisp. Viper mode was fine, but the original vim is better. I wish someone would start from scratch on an editor that looks and feels pretty much like vim by default but is actually an interpreter of a better language than elisp.
He's only gone and dun' it! Mad lad
Today's developers are now all the time dealing with remoting into a VM or container where it is very much locked down so no real option to install other packages (and sudo capability may be locked down too), plus it makes no sense to even do so in an immutable container. The constancy that exist is bash, an assortment of the usual UNIX tools like find and grep - and then vi and/or vim. Never encountered such an environment yet where emacs was already installed. It pays to learn bash and vi/vim and learn them very well because they are the near universal constancy. For me, I can whip vim into shape by dropping in a .vimrc that is about 12 lines, and then am good to go (but obviously can do just fine with stock defaults too). What I absolutely admire and love vi/vim for is the ability to handle gargantuan size text files - in the era of big data, this is a tremendous asset. Plus I can easily examine binary files too by shifting into a mode to handle that.
As to programming environments, I prefer to work in my language-aware IDE where there are all manner of sophisticated capabilities because of the very tight integration of the IDE and its feature set with an integrated language parser. Can't really replicate that sufficiently with the various editor plugins. These sophisticated IDE features are definitely well worth it and give the developer significant leverage to be more productive and facile.
+1! If one is frequently logging into tightly-locked VM's or a container environment, then vi/vim is all they can use to edit any file on there. Sometimes, even vi/vim might not be present there and all you might have at your disposal is nano; a few years ago when installing Arch, nano was the only option to edit files till one got to the stage of being able to run pacman and install Vim for the rest of the install. Thankfully in those cases, it was only simple edits required and nano was sufficient enough for all that.
Working with hypervisors was the other such case where nano was the only editor available.
@@if-constexpr I was one time logged into a postgres container that was very lean - didn't have any editor at all, and yet I needed to change something in a text file, so used sed (had to use cat and more to preview the file to be edited - didn't have less; sort of odd sometimes what is decided to jettison)
You can use emacs over ssh with certain plugins it downloads whatever your trying to do and sends a updated version when you make changes i think
There seems to be some confusion about Emacs, you are comparing an extensively modified Emacs to an almost vanilla Vim
installation. Emacs by default have no integration with git (just like Vim) and the commenting feature is not bound to any key by default and is region based (see comment-region).
Considering that Emacs can be run in the terminal (emacs -nw) and Vim can be run as a GUI (gvim) they should be equivalent in that regard.
Great video otherwise!
It's true that comparing a fully configured Emacs to vanilla Vim is kind of an false equivalency. But Emacs does bind commenting by default to "M-;" and a bunch of variations. And there is VCS integration that also support git, but it's a far cry of magit.
> There seems to be some confusion about Emacs, you are comparing an extensively modified Emacs to an almost vanilla Vim
I agree, there is no comparison with Emacs and Vim.
He is comparing them the way He uses them, and the way they are meant to be used. Emacs doesnt ship with a whole lisp for Nothing. It's meant to be extended. It's an ecosystem, not a Single Software. Vim is a Text Editor. It's editing System is superior to everything else, but thats why most people Use doom / evil. Emacs for me just doesnt have any Benefit over vscode with vscodevim. But the point is: emacs' package ecosystem is a core Part of how emacs should be used. Vim is meant to be very usable without Modification. And it does that well
@Victor GNU Emacs comes with vc built in, which definitely counts as "integration with git". No need to install additional packages.
I also use GNU Emacs without the gui. It is great that it is available as gui, but you can also write "emacs -nw" and run Emacs in the console. I am a writer and book editor. I use GNU Emacs with the AUCTeX plugin, and write in LaTeX to edit books and articles. Now I use Spacemacs, which is awesome. However, since I only learned Emacs, I got used to its keybindings. I will learn Vim's some time.
We now need a Vim vs Nano video.🙂 Great video by the way, thanks.
That is like comparing a bicycle to a spaceship.
@@johnpaulhumphrey2981 I thought it was an obvious joke.
@@night_h4nter I kinda thought it was a joke too, but I used to use nano and so was not sure. It was my way of saying XD
Gonna give Doom Emacs a try on my day off as well! 👍🏻
Undoubtedly, the best comparison of the two so far.
Generally, I already have an OS, so vim is all I need. I can't really understand why one would mix up an operating system with an editor. Why complicate things?
Nano is the best text editor
No, Ed is. 😂
Hahaha
emacs is best OS, and their text editor is quite good too
@@daveshouldaine2520 indeed.
Hi DT and all! Very nice and fair comparision. I don't use emacs so far, but there are several ways to put comments in Vim besides using Visual mode. The # might be the comment-sign.
1. I# (inserts a # at the beginning of the current line) ...for each following line do: j. (the dot-command repeats the last action - very powerful)
2. Write a macro in register a: qa I#q ...now go down one line with j and then play the macro: @a
3. Most elegant and powerful option: combine command-line-mode and normal mode (assuming you have 5 lines of code) :1,5 normal I; (:[range] command, % stands for the whole file).
So - guess, what :% normal I does and :% normal A does ;) And you don't even have to type second out - press uparrow-key in cmd-mode to bring back last sequence. That is the power of vim. Love to do my config-files and tex-style with it. :))
I'm sticking with vim :D
That emacs plugin to comment things with gcc is probably based on vim-comentary by tim pope
A very balanced review of one of the oldest flame-wars. I was going to say that if you quickly want to edit a file from the terminal, then VIM is your guy but nowadays I run a shell within Doom-Emacs.
23:01 Presumably you are backgrounding the command so it doesn’t block waiting for Emacs to close the window.
Another way is to add the “-n” option to emacsclient. That tells it to exit immediately, without waiting for the window to be closed.
Doom... end of discussion.
More of a spacemacs kind of guy
@@shuwan4games doom is way more lightweight and contained than spacemacs, also easier to hack on
@@pushqrdx maybe so but spacemacs default layer have been enough for me where. I don't feel I need to hack on it personally
I personally like doom and the command mode that I am so used to from Vim. I just wish it had fuzzy search or code completion like vim. I tried spacemacs and it seemed similar to spacevim.
I totally agree with you about Magit, that's a game changer in every day as a developer.
Man, you are a very good explainer. I would like to se you looking to the camera while talking. I think it would be more friendly
Emacs was very popular on our VT52 terminals because it would journal, so when the DEC TOPS-20 computer cluster would crash with "Tops System 20 is not running" we wouldn't have lost all of our editing session.
To compare a full blown configuration framework for GNU Emacs with a clean Vim is a bit unfair, isn't? :)
Perhaps would be fairer to compare it with a full blown configuration framework for Vim...
What I think there are not a lot people who think out of box vim is unusable so not a lot people use plugins I didn't know about vim plugins for about 6 months of using it but incase of emacs many think default keybindings are cr@p so they pretty much install extensions as a necessity.
Noticed this to.
Regarding emoji support: I had a similar feeling as to not really seeing a need for them in my editor until I realized that unicode support is very useful for languages that use it display it's characters, like Japanese, Chinese, Lakota and such.
Thanks for the video Derek. I didnt know emacs was this powerful
Emacs is a great operating system, it's just missing a good text editor
I really love the way you say "built in"
Hey, bro! Besides of useful information about Linux, you help me learn English just so you know :)
Mikhail Gorshenin his grammar is good haha i didn’t notice until your comment
You look more alive with beard.
*reads title*
Do you want to start a holy war?
nah, DT would never do that ;)
I use Emacs as my main operating system. Everything's great, but I wish it had a better text editor.
yeah lol
well, there's evil-mode, it is a great text editor!
I'd prefer vim because it integrates with my terminal and I fell in love with my terminal haha. I use ST btw
Though, Evil mode is still quite good.
@@elianiva I have been using emacs exclusively in the terminal for years now. I also love my terminal. :)
Commenting works on vim with this plugin: tpope/vim-commentary
But maybe doom emacs commenting is better (?)
Anyway thanks for taking time to make this comparison. Insightful.
Emacs is better in MANY other ways, not just those. The thing that vim(1) has for it is that the key binding are also good and it is faster then Emacs to start, because it doesn't have a true GUI mode.
Please try my settings for Emacs lisp that I have written in Org-mode.
commenting and uncommenting multiple lines in vim is possible. Based your example,
commenting: 3g I --
uncommenting: 3g 2l d
no scripting needed
Obviously it's ed: the official text editor
For real though, whichever editor isn't gonna get in your way and let you get stuff done. If somebody is faster writing code in geany, so be it. The last thing we'd want to do is shove either vim, neovim, emacs, doom emacs, spacemacs, joe, _that editor_ (bisqwit's thing), etc without knowing what they're getting themselves into and forever be discouraged from ever using them again.
gcc comand comes from vim-commentary plugin. Doom Emacs must be using something like that by default. You can get the same in vim too.
I think it's a great video presentation of these two big softwares!
I liked that you mentioned their story and then their differences. Through your examples showing the orientation of each tool.
I like that you mention and refer that Emacs is more than just a text editor!
P.S. : Anyway I think it would be very nice and interesting a video to show how (possibly with plugins/extensions) you can make VIM much more powerful and look like an IDE or Emacs .. ;-)
Thank you! :-)
Thank you, Derek. I cannot get into either for literary or translation work. Tabbed and tiled instances of Gedit works great for me. Except for being able to export footnotes to LibreOffice in a convenient manner. But enjoy both and either.
I haven't used Vim (used to be stuck with vi before there were options), but I can't imagine a better Lisp editor than emacs. As to the danger of the default emacs key bindings, I just remapped the caps lock key so I don't have to stretch my pinky. Why we even have a caps lock key today is a mystery.
Nice piano work Derek! 👍😄
I can affirm that magit is a killer feature I can't live without. It is so easy to do line-wise review and commit using magit whilst for command line tool, it would be sooooo complicated
I think Emacs is like a web browser as now we run various of web applications on the browser. The primary purpose of JavaScript was to handle DOM in HTML. Emacs LISP was to handle text in buffer. Both can run the language to run many application using HTML (web browser) or text as a user interface.
They're both great programs. I use vim, and am still a beginner with emacs. I enjoy both, and each of them frustrates me sometimes.
Though, out of the box, vi is installed by default on almost every *nix installation, and a workable cheat sheet is less than a page long.
Emacs has a real and formal programming language, elisp. With elisp, one can extend emacs in almost infinite ways. It has built in shells, an organizer, and games, out of the box, just for starters. It's nearly its own operating environment.
One thing I like to do is keep Emacs running all the time. Then when I navigate to a file I want to edit, I use the “emacsclient” command to send that filename to Emacs to open.
How about Kakoune? It ruined Vim for me personally, I can't go back to it.
I've been curious about this editor. I might check it out at some point. Maybe.
My impressions from trying it out a bit were that I liked the design of its modal editing, but not how often modifier keys have to be used, and that the ecosystem is unsurprisingly sparse and unpolished.
Many others here have shared a few vim plugins for toggling comments. I just wanted to underscore that vim itself has no problem displaying emojis. It has to do with if your terminal support s emoji or not. For example, gnome-terminal and tilix have no problem. But urxvt? Not so much. (Edit: As I was typing this, you just mentioned it's the terminal that is the deciding factor.)
Emacs is following the Unix philosophy. Emacs is a placeholder for programs. They could text editors, browsers music players or actually anything.
Saying emacs is not following the Unix philosophy is like saying manjaro isnot following the Unix philosophy because it has a terminal, a browser and other stuff.
Walid exactly what i was thinking
Nobody gonna mention the "btw i use ARCH" mug in the background?
Don't you know what DE is this? Xfce?
@@СанжарМатчанов dwm
i don’t get tired of hearing him say “Veemm”
This is super cool, thanks for the vid!
Vim mastered keyboard navigation, before moving to emacs I used vim plugins in every editor I’ve ever used. I started with spacemacs which has evil mode package installed by default. Also a good protein is to swap caps lock for ctrl, helps with general use of control which you can’t avoid even with vim
if youre using vim it makes more sense to swap caps lock with escape
Not that I want to flame this war, but vim is for Jedis, Emacs is for Lords Sith and the rest is for Stormtroopers. :P
So Emacs then? Because Only a Sith deals in Absolutes
regarding the comment toggle I believe what provides you with functionality in Emacs is evil-commentary plugin which is in fact re-implementation of vim's plugin called toggle_comment. So in fact neither Emacs nor vim has this build in but both has plugin for it.
Generally Doom Emacs has a ton of plugins. I think you should either compare Doom/Spacemacs with spf13/janus or just plain emacs with plain vim otherwise it will be very hard even for you and even more so for people watching the video to distinguish between plugins and build in functions.
EMacs is considered, jovially, an operating system. LOL
A bit cliche, but always makes me chuckle.
Which is better, Emacs or VIM; answer is yes.
Great summary, Derek. Clear and to the point. Thanks!
I use Emacs since 22 years. Best decision ever. I have started with the Emacs for Windows.
Nice intro and comparison but... You are comparing a more or less vanilla Vim to a heavily modified Emacs pre-bundled with some very high quality plug-ins that are *not* built in to the editor. Magit is certainly not built in to Emacs. Mu4e is not built in to Emacs. Ivy (the completion lists that pop up in the bottom) is not built in to Emacs. And as others have mentioned, Doom comes bundled with a lot of plug-ins that are actually ports of Vim plugins.
I'm a long time Vim user but using Emacs more and more now (Org-mode was the feature that really sold me), so I'm not trying to put down Emacs, just don't want people to be disappointed if they install a vanilla Emacs and expect to see all this working out of the box.
I thinks that this is an Unfair Review.
Vim as you says is an extendable Text Editor,
This amazing piece of software gives the possibility of use it
as a simple Text Editor or a Full IDE with no more than 6 Plugins.
Emacs, as you said, is already bloat it.
Vim user here, trying to get comportable with emacs as well for a couple of months so far. I've started with doom and then tried spacemacs. Both are great. Emacs is wonderful. I like almost everything of it but I've a problem that frequently keeps me switching back to vim. Slowness. In certain cases emacs (not talking about vanilla emacs because I'm not able at the moment to create my own configuration) is realy really slow compared to vim, specially in autocompletion, undoing changed and loading files(large ones). I hope to find a way to solve these issues and hopefully an alternative to company-mode that seems to be the most slow thing in my experience.
"viyum" lol
My current goal is to master Vim + Dvorak.
One day I may try Emacs as well but I don't feel the need for it right now. I am kinda new to Vim, I've been using it for about 1 year so far and I am pretty happy with it.
vim + dvorak sounds like a recipe for breaking your keyboard. Man is not meant for those speeds!
Seriously, if you're a math student you could easily take notes in production quality Latex with that setup.
@@jessejordache1869 Turns out to be very hard to achieve and I have not done it yet. :( Much training is needed.
Unix: text is the universal interface
Emacs/lisp machines: lisp s-expressions are the universal interface
Doom-Emacs is not a vanilla emacs, so the comparison is not totally fair.
You say that emacs commenting and git support are out of the box , but those are actually packages.
For the same purpose, vim has t-commenter for comments, fugitive for git, ctrlp for file opening (and that handles mru files, buffer switching etc...).
With the plugins and packages those 2 are very close, and I personally love both for their own rights.
Emcas vanilla is a different experience, but looking at alternate packages can help with workflow.
Helm vs. Ivy, or even ido etc.
Despite using vim the most, I prefer the extensibility of emacs because of emacs-lisp.
I'm trying to migrate from vim to emacs and it has not been smooth, for a couple of times I really wanted to give up. Maybe I was wrong in the first place to try to replicate as much of my vim workflow as possible over to emacs, rather than learning and adopting to the native emacs ways (that doesn't apply to the evil-mode of cause, the emacs keybindings are insane).
I'm currently struggling to make company (a word completion package) to work with yasnippet (snippet/template expansion package) by binding both to the TAB key. The lisp synax is also so weird and I'm having a hard time reading solutions people posted online.
This is how I format my Elisp code: github.com/ldo/emacs-prefs/blob/master/dotemacs
Thanks for great explanation. As a newbie, emacs is what I wanted to learn. Where should I start?
Good information. I heard that Digital Equipment Corperation's TPU and EDT was written in emacs. EDT is my favorite text editor. Unfortunately it is licensed for VMS only, and I don't think HP is willing to give up the code for TPU.
I think for audio samples, you should record your trombone. LOL
TPU was AWESOME! Until they released LSE
No they weren’t. Switching from TECO/VTED, I found EDT pretty horrible. TPU was better, and I had fun customizing it, but its regex searches had limitations (fixed in later versions).
By the way, the earliest versions of Emacs were written in TECO. If you don’t know what that is, imagine what the random characters that appeared on your screen looked like, if your terminal was connected to a serial line at the wrong speed. ;)
While I'd like to try EMACS, there's a few things I don't like about it.
Firstly, GNU Emacs (which seems to be the most common distribution these days) was stolen from the James Gosling version of EMACS. From what I understand, James Gosling could no longer maintain EMACS, so he asked around for people who would like to take over, but since nobody else could take the project it was sold to UniPress. Richard Stallman was not happy about this, I believe because a few other people had made contributions to the editor, and him being very stubborn on his copyleft philosophy, he stole the source code and released it as GNU Emacs. Suddenly, with UniPress being a dying company, they find IBM and DEC distributing their software for free. They decided to sue IBM and DEC, but Richard Stallman was never targetted, because he was homeless at the time (RMS had weird views on economic models at the time, he was more or less living at MIT). Of course, they won the lawsuit, the code matched line for line, and RMS even forgot to remove the copyright notices. I believe IBM and DEC got fined, but GNU Emacs from this point on took on it's own life. Which brings me to my next point.
Secondly, GNU Emacs is not really a text editor. As GNU Emacs took on it's own sort of identity, RMS turned it in to a LISP processor, more than a text editor. Now GNU Emacs serves as an extensible productivity suite, but the text editor is lacking, and so many people emulate VIM within Emacs. I mean, EMACS stands for "Editor MACroS", but the macros is GNU Emacs are slow and inefficient, many times you have to resort to using a LISP evaluation, and even then it's still lacking in comparison to traditional EMACS. Another problem is that the extensibility breaks the UNIX principle, where now you're replacing all your programs with a so-so Emacs addon, instead of my dedicated programs. All I want out of EMACS is a text editor. But especially GNU Emacs is slow and inefficient, and the keybindings are oftenly criticized.
And finally, with RMS having taken over EMACS, it now falls under the GPL license. Overall, I don't like GPL licensed software for essential software that I use, such as a text editor. Copyleft works well in many places, but I have my disagreements with the licensing, especially some of the changes in GPL licensing.
While I have gotten used to editing with vi-like editors, I don't really like VIM all that much, it feels messy, and I feel like it misses the point of vi. And while it makes for a better text editor, the configuration feels cluttered, especially when working with plugins. Neovim makes this better with Lua, it is tied to a very long history and still feels like a mess at times.
Perhaps I'll give uEmacs a shot, there is an editor called mg (previously called MicroGNUEmacs, but changed by the request of RMS) which is uEmacs with bindings that are more familiar to GNU Emacs users (it is not affiliated with GNU). It is also public domain, and currently maintained by the OpenBSD team. Or perhaps I'll try a more vanilla uEmacs if I don't plan to learn GNU Emacs bindings, Linus Torvalds uses uEmacs and it seems as though there are patches available for it. Dired looks like a nice feature though, and it is included in mg, but I'm not sure about uEmacs. Or maybe I'll try Kakoune, or a similar vi-like editor.
Words from the technical pov after 100k+ vim script and 10 years' plugin writing, vim has the strongest friend python that is seldom mentioned. This is what make vim not only the most editor but also the strongest operation system.Go through the python and vim help, then it maybe not that blurry.
The king of cryptic text editing was, and remains, Teco, which is still available for several platforms. Emacs was originally written in Teco, and Vi/Vim are shameless plagiarisms of the Teco command interface. Teco was written by Dan Murphy on the Digital Equipment PDP-1 computer in 1962-63. The PDP-10 series computers in the late 1970's (the one Bill Gates used to create MBasic) came with a huge security vulnerability - Teco could be used to 'phish' user logins/passwords from the text mode terminal login prompts because it was the only user runnable program other than LOGIN with privileged instruction permission to the SETLCH instruction (by being started under the system user [1,2]). SETLCH allowed LOGIN to turn off terminal echo for the purpose of receiving a password. One could therefore also emulate a login prompt in Teco, receive the login/password keystrokes, save them to a file and then reply with
?INVALID ENTRY - TRY AGAIN
#
before immediately logging out of Teco and your own account directly to a (real) login prompt.
Vim over Emacs. But org-mode over markdown/vim-wiki/vim-org/etc.
That's why I use Doom.
There is a fantastic Git client plugin for Neovim called gina.vim. It may also work with Vim 8+, but honestly if you're still using standard Vim you ought to consider switching to Neovim. gina.vim is a lot like Magit for Emacs, which I imagine served as the inspiration for it.
I just use a magnetic needle.
and a steady hand
This is for n00bs: www.slant.co/topics/1150/viewpoints/32/~best-keyboards-for-programming~supercoder-2000
Noob. I just use a butterfly