10 ms·
Why Emacs?
- keeptrying 15y agoI use emacs. But arguing between Vim Emacs and Textmate is a perfect waste of time. Get back to work.
- chromejs10 15y agoHe's not arguing which is best at all. He just talks about why he loves Emacs so much. It's a nice article that may make some non-emacs users look into using it.
- aiscott 15y agoI want to use emacs. I really do, mainly because of its lisp integration. Partly because I don't like being "locked" into vim. This article does make me want to give it a shot again. But it is so painful to try to switch. It's a heavy cognitive load to do even simple things like navigation. The best way I can explain what it is like is to reference the frustration of trying to switch from QWERTY to Dvorak. It is incredibly frustrating to go from 60 WPM to 10 WPM. It burns so much brain energy on such a critical and fundamental task. There may be a great payout if you are successful, but it's a big hurdle to get over. There are some things that emacs does better than vim can, that I do want to switch. I'm just starting to doubt my reserves are sufficient for that task and doing other productive work at the same time. Edit: completing some thoughts
- ecyrb 15y ago> But it is so painful to try to switch. It's a heavy cognitive load to do even simple things like navigation. You might be interested in viper mode [1], or another one of the VI emulation modes for emacs. [1] http://www.emacswiki.org/emacs/ViperMode http://www.emacswiki.org/emacs/ViperMode
- aiscott 15y agoYes, I have tried viper mode, and it's a good effort. But it can only handle the basics, or at least when I tried it was just the basics. I have a ton of vim scripts customizing vim, adding features, etc., that just don't work with viper mode. Part of me thinks that if I go over to emacs, I ought to go with the 'native' experience of it. I appreciate the reply; and others may find Viper mode very useful.
- ecyrb 15y agovimpulse is an extension to viper and gives you (for example) visual mode (copy blocks using 'v'). http://www.emacswiki.org/emacs/Vimpulse http://www.emacswiki.org/emacs/Vimpulse
- rdtsc 15y agoThe trick is to start with a few basic ones then learn more as you go along. Know how to quit (C-x,C-c) & save (C-x,C-s). Then basic moving commands: C-p (up), C-n (down), C-b (left), C-f (right), C-a (start of line), C-e (end of line) I used just those for quite a long while before I learned others, and even with just those command I realized how much faster I was working, as it saved time from having to move my hand to the arrow keys.
- DrewG 15y agoIf thats all it took to improve your productivity, you can't have been very proficient with whatever it was you were using before.
- rdtsc 15y agoHuh? How did you deduce that? Suppose I was punching holes in cardboard cards and feeding them to a card reader. How does the fact that emacs improved my productivity reflect how proficiently I was punching those holes?
- michaelty 15y agoHere's the other vi emulation mode: http://gitorious.org/evil/pages/Home http://gitorious.org/evil/pages/Home It even has its own port of surround.vim: https://github.com/timcharper/evil-surround https://github.com/timcharper/evil-surround
- aiscott 15y agoThat looks interesting. I hadn't heard of it before, I think I will give it a try. Thanks for the link.
- kamaal 15y agoWell changing to another editor, just for the looks of it. Looks like a very bad idea. Editors are productivity tools, not religions that if you don't use one you will end up going to hell. Learning is good. But if you are using vim and you are productive enough then building on top of it will help you more than learning Emacs from the scratch.
- __david__ 15y agoI won't lie, it's a painful first few days. It feels slow because you have to look up every little thing you want to do and mentally translate what you want to happen into these new strange keystrokes. Really, it's all about your frame of mind. If you go expecting to hit the ground running you're going to be frustrated. But if you come from the place where you know you're going to go slow and you're just going to do it anyway for a couple/few weeks then you'll have a much better time. One thing I think is important is to not overwhelm yourself. You'll want to do all these cool things but you'll never remember the nifty commands if you don't even know the basic ones. Just use it for a week or two with just basic cursor movement, cut/copy/paste, saving and quitting. It'll feel like "nano" but with worse keys. Maybe learn isearch after couple days, and query-replace after a week or so. Seriously, don't even think about "buffers" for the first couple weeks. Emacs has so many features and editing commands that you're guaranteed to get overwhelmed if you try to take everything in all at once. It also really helps to be in close proximity to someone who uses emacs so that you can ask questions as they arise.
- lucian1900 15y agoI've been using Emacs with Evil for a few weeks. It's really good, possibly the best vim-mode I've seen.
- chromejs10 15y agoI guess it depends how you define slow. I've never been big on VIM but have used it a number of times. My biggest complaint with it is going in and out of insert mode. With emacs, as long as you keep learning more and more about it, all the shortcuts become muscle memory and you can whip through things pretty fast. In my experience, the extensibility of emacs was why I kept using it. I don't really notice any "slowness" compared with VIM. It's not enough to make me go to VIM anyway. But either way, to each their own. It's probably best just to know one really well and know the basics of the other. I've never been big on the whole debate. They each have their pitfalls and benefits
- keeptrying 15y agoI wasnt commenting about the author's post. Rather I was commenting on what all the commenters for this post were about to do :).
- cema 15y agoGet back to work. Time to hack, time to sharpen the ax. It's weekend now, so sharpen it is.
- rbanffy 15y agoActually, it's far from perfect. A perfect waste of time would waste time and nothing else.
- k_bx 15y agoAlso I noticed only recently that emacs32-nox is really-really lightweight and starts immediately, so I am happy to install/run it on my servers.
- mixmax 15y agoThe power of emacs is also it's biggest flaw - it's a tremendously powerful piece of software but it's hard to master. I think it's a matter of discoverability. A simple program such as Microsoft paint delivers a nice inital experience - my mom will be drawing moustaches on her pictures in no time. The reason for this is that it has great discoverability: Click on the little pencil and start drawing. Nothing to know, nothing to remember, just start using the program. This, of course is also it's biggest drawback - as the complexity and possibilities of a program increase it becomes increasingly difficult to create a simple GUI. If you move up to something like photoshop you start to reach the limit of what a graphical user interface can deliver. It's hard for a beginner to just sit down and start. There are masks, layers, palettes, and all sorts of other things to master before you can really use the program the way it's meant to. There's still discoverability - you can actually learn photoshop without a manual, just by clicking around. But it comes at a cost: A lot of options are hidden behind two, three or sometimes four mouseclicks. So you have a program that's hard for a beginner, but not streamlined enough for an expert. Emacs is at the other end of the scale. It has basically ditched the crutches that are the graphical user interface, which makes it a great program for experienced users that know exactly what they want to do and how to do it. But it has no discoverability. If you don't know how to perform an action emacs won't give you any clues(1), and it won't tell you what it can or can't do. An often heard remark in regards to emacs is "Wow I didn't even know you could do that". (1) Yes I know there are MAN pages, manuals, etc. but they don't count. I often get better results from a simple Google search.
- kiba 15y agoThe power of emacs is also it's biggest flaw - it's a tremendously powerful piece of software but it's hard to master. I think that's wrong. It more having to do with emacs having old arcane UI convention that doesn't make sense to a modern user. Where is my copy and paste? It's not C-c C-p? Save is C-x C-s? WTF?
- mixmax 15y agothat's exactly my point - emacs doesn't put emphasis on the UI at all as you point out. If you can be bothered to learn its, as you put it, arcane ways then it's tremendously powerful tool. But my mom wouldn't stand a chance.
- kiba 15y ago20 years old like me are using emacs these day. It's not for old people anymore. I bet there are people in the world who are two decade more than my age and never touch vim, or emacs.
- dextorious 15y agoYeah, because you know all about programming demographics, from your remote part of the world...
- __david__ 15y agoNot for old people anymore? Why when I was your age.... Well, I was using emacs. Seriously, 20 year olds have always been using emacs. It's just that suddenly 15 years go by and you're not 20 any more (but your .emacs file will be cleaner).
- jphackworth 15y agoOne feature of Emacs that I wish IDEs would or could adopt is macros. It really enables a larger set of refactorings when you can repeat any text transformation. You really need non-popup find-this-string, though.
- cturner 15y agoOne feature of Emacs that I wish IDEs would or could adopt is macros I think you'll need to have a reflective language as your foundation to do this as well as emacs. It doesn't have to be a lisp - io language has this property as well. But otherwise the IDE developers need to consciously build and expose functionality. Despite this amount of work, users will keep running into things they hadn't thought of and which won't be accessible (unless you build a plugin - a similar concept).
- yoklov 15y agoI suspect he means keyboard macros, as opposed to macros defined in emacs lisp using forms like defmacro. Keyboard macros allow you to record an arbitrary sequence of actions, whereas lisp macros allow you to perform arbitrary transformations on your code. I could be wrong though. Still, keyboard macros could be amazingly useful in an IDE setting.
- greggman 15y agoI'm going to stick out like a dork I suppose but I prefer slickedit. It gives me all the stuff claimed as great for emacs AND all the stuff claimed great for IDEs. The only thing it doesn't give me is vims smallness but since I rarely exit the editor that doesn't effect my workflow.
- tseabrooks 15y agoI'm a huge fan of slickedit. I've switched to OS X in the last couple years and the crappiness of slickedit on OS X has me looking for a new editor.
- greggman 15y agoThey are privately testing the beta testing the native OSX version of Slickedit right now. They expect to have a public beta within a couple of weeks.
- ChuckMcM 15y agoI was a huge fan of slickedit as well. It was my main editor on Windows. My 'birth' editor was FINE (Fine Is Not Emacs) which was based on Finseth's thesis but wasn't as computationally heavy as Emacs on the DEC10. On CP/M I used Mince (Mince is not completely EMACS) and later Microemacs. When I got to Sun I learned vi. Left Sun, forced to use Windows and that was where VSE became my goto editor of choice. Then Netapp, mostly windows, some not, used VSE and vi. Then Google and used vim almost exclusively because it was the 'same' on my macbook and my workstation. Once I got a good port of VIM for windows I could have the same environment everywhere.
- morazow 15y agoI have started using emacs recently. Before I was using vim (approximately 4years), and one of the things I liked in emacs is there is no editing and command mode, you don't have to press ESC and goto the end of program in emacs and then enter to edit mode, for instance. However, I think it will take time and patience to master emacs.
- aufreak3 15y ago> A very trivial example is the fact that most IDEs don’t even have keybindings optimized for touch typing - they require you to move your hands often from the home row (such a waste) and have mouse-centric UIs. what? ... and Emacs has optimized key bindings for touch typing? C-x C-c! Personal notes here - I know emacs-vs-vim is war, but I'm interested in the cognitive aspects of why one works for some people and why another works for others. My own preference - vim - is driven by memorability of commands. Though I used to use emacs for a long time, remembering commands was a problem for me. When I tried vim, I found many of the commands I need frequently to be memorable because they are compositional. Here is what I mean - if I learn the concepts "delete = d", "change = c", "copy(yank) = y", "in = i" and "around = a", I can construct "delete around (" = "da(", "yank block" = "yank around {" = "ya{", "change array contents" = "change inside [" = "ci[" and so on. So do long time emacs users just remember the keystrokes or have some kind of logic like that for them? edit: I know emacs is much more than that, but my usability question is purely about the keyboard interface.
- rdtsc 15y ago> what? ... and Emacs has optimized key bindings for touch typing? C-x C-c! I can type C-x C-c faster than switching to a new "mode" or moving the mouse pointer anywhere. As for memorability of commands, I really remember them using my finger motor memory. If you are stopping to think for what the command is before using, might as well start moving the mouse. The question is then, how does one get to that point? And that what you are pointing out I guess, when learning, it is hard to remember. The trick though is to do it, step by step. If you just know how to save and quit the program you can use the editor in a very basic way. Use arrows, and type. Then you can learn commands as you go along.
- jamesbritt 15y agoIf you are stopping to think for what the command is before using, might as well start moving the mouse. No, because over time you will pause less often, and for less time, until it becomes automatic.
- 15y ago
- derpsaidderp 15y agoI think emacs is probably one of the biggest mistakes to ever happen to computer science. First, let's remember that emacs is not powerful in and of itself. It requires mastery to understand the potential and power that lies in it. The inclusion of emacs lisp is amazing, but seriously? Have you programmed a separate application in emacs lisp? You haven't? What? You used Scheme or Common Lisp instead? Than why the fuck are you defending emacs lisp? And that is the biggest flaw. The flaw no one likes to talk about. How many people have picked up emacs and quit? I certainly have. Numerous times. How big do you think the population of people who have tried emacs is to the number of current users? Seriously, in terms of a conversion rate, it's absolutely terrible. And you think that's a good thing? Don't give me that bullshit about how only "smart" people will put the effort in. It isn't about fucking effort. It's about giving people the confidence to learn more about your software. And emacs almost definitely fails there. And that's the whole fucking point of computer science. It's not writing the "greatest" programs. It's sharing. Sharing techniques, skills, libraries and ideas. And emacs is an artificial barrier. And worse than that, the most elite people in CS continue to protect it and cannot comprehend that their elitism is to the detriment to CS as a whole. It's complicated, arbitrary and designed in a terrible manner. I don't care if it makes sense to you. What matters is that you should be able to easily defend any design decision. And you can't. We need more people to start programming. We need better editors. Why is it that CS has some of the oldest, most decrepit tools with the most adamant defenders? Why? Seriously, we deal with fucking computers all day. The most arbitrary representation of knowledge possible. And all people do is whine about how things are "good enough" or "no, someone made this decision a long time ago, and now a lot of people make the same choice, so don't be stupid and choose that." The number of new computer languages being invented is almost fucking SLOWING down. WTF? Computer science is about the drive to find better ways to express and share knowledge, and that means trying new things. Usually, they will suck. But jesus, we have to keep trying. And whatever we do, we have to help a). more people try programming, and stick to it b). support people following their own loony ideas. I mean seriously, it's fucking sad how slow shit happens. Common lisp, one of the more powerful languages ever invented, got a wonderful tool called quicklisp last year. 15 FUCKING YEARS AFTER CPAN CAME OUT. Why the fuck is shit so fucked up, I mean jesus, it's fucking inexcusable. Our descendants are going to mock us to our faces til we fucking hara-kiri.
- agentgt 15y agoI am a long time Emacs users but now I shamelessly admit I am an Eclipse user. Eclipse handles plugins really well. What I loath about Emacs is its plugin management. It is a PITA to download new plugins or update existing ones. Also Eclipse generally understands the programming language your working on. The whole you have to use your mouse in Eclipse is total BS. In a simple keystroke I can navigate the type hierarchy of a class and or the call hierarchy of a method.... not to mention auto-completion. For Scala, Java, Javascript, and XML I use Eclipse. For Python I use Emacs because its still the best editor for it. If your using a JVM language give Eclipse a try. I'm glad I did. IMHO IDE vs Emacs is becoming so Déjà vu of Emacs vs Vim.
- pivo 15y agoFor what it's worth, Emacs 24 has built in package management. It's arguably easier than using eclipse's package management.
- cksk 15y agoEl-get is a package manager that really helps with the plugins. It allows you to install them very easily and update them with just one command, among other things. https://github.com/dimitri/el-get https://github.com/dimitri/el-get
- kamaal 15y agoEclipse largely wins because for verbose languages it fills in the gaps in the templates pretty well. But for large text manipulation, automation, and non linear gains in productivity, Emacs is better designed to enable those than Eclipse.
- keypusher 15y agoHave you tried Pydev for Eclipse?
- SingAlong 15y agoDid anyone else try "M-x butterfly" after reading the comic strip in the blog post? I just tried it out of curiosity and it seems like an easter egg :D 1.) M-x butterfly 2.) The mini-buffer asks "Do you really want to unleash the powers of the butterfly". I entered "yes". 3.) A new buffer opens up and then there's this text-based animation with the text "Amazing physics going on..." 4.) The mini-buffer says "Successfully flipped one bit!"
- rcthompson 15y agoYeah, they added it to Emacs in the next release after that comic.
- jerrya 15y agom-x find-function butterfly (defun butterfly () "Use butterflies to flip the desired bit on the drive platter. Open hands and let the delicate wings flap once. The disturbance ripples outward, changing the flow of the eddy currents in the upper atmosphere. These cause momentary pockets of higher-pressure air to form, which act as lenses that deflect incoming cosmic rays, focusing them to strike the drive platter and flip the desired bit. You can type `M-x butterfly C-M-c' to run it. This is a permuted variation of `C-x M-c M-butterfly' from url `http://xkcd.com/378/'." (interactive) (if (yes-or-no-p "Do you really want to unleash the powers of the butterfly? ") (progn (switch-to-buffer (get-buffer-create "*butterfly*")) (erase-buffer) (sit-for 0) (animate-string "Amazing physics going on..." (/ (window-height) 2) (- (/ (window-width) 2) 12)) (sit-for (* 5 (/ (abs (random)) (float most-positive-fixnum)))) (message "Successfully flipped one bit!")) (message "Well, then go to xkcd.com!") (browse-url "http://xkcd.com/378/")))
- nosignal 15y agoI've recently (~3 months) started using emacs "full-time" for org-mode, text notetaking, Python, and Octave. Here is a (small) list of things I'm sure emacs can do: - Integrate with git; - Run my Python and/or Octave code inside emacs; - Perform autocomplete on my Python/Octave code; - Become my blog publishing platform using a combination of the above features; - Replace my email, twitter & RSS clients; - Read and post to HN from within emacs Here is a list of how many of those things I, personally, can actually do using emacs: -None of them I love it for a text editor, I love the keybindings and commands, I love the theory of how extensible it is. But by god it's a nightmare to set up and configure. For all the "guides to emacs" there are out there, it would still take me about 2 or 3 days to get it running like the well-oiled machine I'd like it to be. I'm sticking with it, but when I'm learning Octave, to learn about Machine Learning, to get better at programming — having to stop to learn how to use my text editor is just one step too far. One day work will settle down and I'll have more time to stuff about getting emacs to do exactly what I want; but for now I feel like I'm using IBM's Watson to help me beat Words With Friends.
- timf 15y agoI don't think a lot of those things are worth learning. I would never consider using git from anything other than the shell or email from anything but my favorite client. It's all personal, of course. > Perform autocomplete on my Python/Octave code .. except for auto-completion, who doesn't like that? :-/ Try the 'dabbrev-expand' command for auto-complete in any mode (naive match on other words in the buffer): M-/ Then check out 'C-h a expand' and 'C-h a complete' (apropos searches for commands related to code completion).
- rcthompson 15y agoDon't dismiss the value of Git integration in your editor until you've tried Magit in Emacs. I hardly ever need to run git at the command line anymore. I particularly like how easy it is to stage individual hunks in Magit.
- fakeempire 15y ago
- rayiner 15y agoI love Emacs. Have used it for years. Which makes it frustrating that the GUI sucks so hard. I program on a laptop which means that reaching for the mouse is far less expensive then it is with a keyboard+mouse setup. Sublime Text supports this beautifully, by offering pretty comprehensive keyboard-ability while not neglecting mouse-ability. Emacs just falls down hard on this front. Not to mention that on OS X it does pretty much everything against the basic conventions of the OS.
- diamondhead 15y agoEmacs is a platform, others are only editors.
- jaequery 15y agopeople think emacs users use emacs for it's sheer power but i think that is the wrong perception to have (and promote). the sheer power is in it's key bindings. it lets you literally take full control of texts with pin-point precisions just like a surgeon does with his tools. the speed and efficiency of it is just un-matched by any text editors out there. i've seen some power vi/vim users get close to speed but still can not rival against a power emacs users. long live emacs.
- rbanffy 15y agoI like being able to easily write my own functionality. It would take weeks to do on Eclipse what I can do in a leisurely afternoon on Emacs. Archaic a dialect of Lisp as it is, Emacs Lisp makes Java look like something out of the 50's.
- maximilian 15y agoIn the article he links to "Emacs Prelude". From its README: No arrow navigation in editor buffers This is not a bug - it's a feature! I firmly believe that the one true way to use Emacs is by using it the way it was intended to be used (as far as navigation is concerned at least). That's why I've disabled all movement commands with arrows - to prevent you from being tempted to use them. I don't use my arrow keys that much, but do any others see this as a useful feature? How do you typically navigate around code in Emacs?
- TeMPOraL 15y agoI disabled them in my Emacs for the same reason - to force myself to use C-f, C-b, C-p, C-n and related keys instead. One problem with arrow keys is that they're far away from home row, so you need to move your hand quite much to the right to use them, and then back to the left to continue editing.
- calibraxis 15y agoMainly, I use my arrow keys for M-x tetris. ;) To navigate, I typically use incremental search (C-s or C-r). Because moving up line-by-line is a slow linear process which gets annoying if you're not a couple lines away from the target. You can also use the mouse, which is a very direct way of getting where you want to go. There's also page up/down. (If you don't want to move your hands, that's C-v and M-v.) And for moving the screen (without moving the cursor), there's a quick C-l. If you want to go to the very ends of the buffer, there's M-< and M->. Then there's linguistic motion, because you're often thinking in terms of moving in units of text. So, M-f if forward-word; M-} is forward-paragraph. Then there's navigating units of code. Which is like moving in units of text, but you press control too. Like C-M-f is forward-sexp, which pushes you forward a code unit. (Like a string or variable name.) C-M-a is beginning-of-defun, which gets you to the start of the function/method/whatever you're in.
- ordinary 15y agoIn my experience, nothing helps you change a muscle-memory habit as much as instant negative feedback. It doesn't help to remember 2 seconds after you did it, because then you've already told your brain "this works", and you can only go through so many "oh right, I wasn't supposed to do that" moments before you become demotivated. When I first started using Emacs, I removed the arrow keys from my keyboard to force me to get used to C-(fbnp) and to this day, when I fiddle with my bindings, I still use that technique, though I'm slightly more sophisticated about it now: (global-set-key (kbd "C-+") (lambda () (interactive) (message "Use C-x C-+ instead.")))
- X-Istence 15y agoWhen the author starts going on about IRC and email within emacs the first thing that came to mind was an old joke: "Emacs has everything, email, chat, and even a web browser, hopefully next year they include a text editor" or "Emacs, for when you want to do anything but edit text" Now I will readily admit that I use Vim for my day to day work and have not spend any significant time in emacs, but I do find the many control commands jarring and difficult to remember. My boss is a big emacs guy, and whenever I help him with code or he helps me with code we make fun of each others editing environments :P I hope to eventually have the time to learn emacs to its fullest and understand it. Being able to use a variety of different editors won't hurt.
- billpatrianakos 15y agoWe get it! Emacs is god. Or Vim is god. Whatever. Why do we keep having to be subjected to Emacs/Vi love letters on the front page of HN? Then someone says "but Emacs can't do this!" then the other guy says "well vi cant do that!" then we talk about key bindings and it becomes the same post with the same comments and then everyone downvoteed the guy who called it out. Next story!
- dextorious 15y ago"""Why do we keep having to be subjected to Emacs/Vi love letters on the front page of HN? """ Because we like reading them, stupid. This is a community driven site.
- georgieporgie 15y agoIn my limited experimentation with Emacs, trying to get started with Lisp/Scheme, it seems like a bit of an ergonomic nightmare. That may be affected by my Dvorak layout and Kinesis keyboard, perhaps Emacs is the one Kryptonite of this combination...