Hacker News new | past | comments | ask | show | jobs | submit login
Setting up Emacs as a Ruby development environment on OS X (codemancers.com)
78 points by iffyuva on Oct 28, 2013 | hide | past | favorite | 19 comments



Through the 90's and into the 00's I used emacs for the better part of a decade. But then as java became bigger and I 'had' to use an ide to be productive in it, I switched to Eclipse. Then when Rails came along, I switched to Textmate. Of course, TM 2 was open sourced and then I switched to Sublime Text 2. During all this, every 6-12 mos, I would download a version of emacs, play with it, then go back to work.

I know emacs can do everything including make me breakfast, and I think the happiest/productive I've been with a editor was when I could do all my java builds in emacs and run all my tests from a TM 1 window. I know emacs can do the latter - I'm sure someone has written this functionality, probably years ago.

One of the things I always missed with the current editors is split panels - I used it all the time with emacs. I never really cared for folder icons or a lot of gui chrome and I prefer never to have to use an ide. Maybe now is the time to check in again. :)

*side note: if you are building from brew, be prepared for a big compile. The emacs source is ginormous.


I recently switched from NetBeans to Emacs, and while NetBeans did support split windows, it involved carefully dragging a tab to just the right place in the application, then adjusting, then reaching for the mouse any time you wanted to scroll. With Emacs, it's not just split windows, it's split windows accessible via one key command, and a shortcut key to scroll the _other_ window without switching that really boosts my productivity.

The thing I thought I'd miss the most was not being able to use the scroll wheel in the text terminal, but using 'go to next function' and 'go to previous function' key combos, along with making very liberal use of inline search has done a pretty good job replacing how I previously navigated documents.

I didn't think that not having to leave the home row keys was such a big deal but now I have to do it so much less often taht I can feel how jarring it is to my rhythm of working.


If you use the gui version of emacs instead of the terminal version you can still use the scrollwheel.

I usually run 1 gui emacs instance with my main development environment and only use the terminal version when logged into remote machines.


You can use the mouse + scrollwheel in the terminal as well. Eval (xterm-mouse-mode).


I looked into those, but my preference for not ever leaving the home keys is trumping using the scroll wheel for now.


You are right to not do so. Describing what is not impossible is hardly advocacy, however. There are a few uses for allowing mouse in terminal emulated emacs of varying utility. Same with the GUI version, but just to get basic mouse/wheel functionality is not one of them.


Hey if you're really trying to have Emacs work in your dev environment, look into Autocomplete and flymake (though I'm assuming you've heard about them already) and some more of the package repos (marmalade, etc)... They should be able to help replace the features that IDEs offer...

I no longer know what to do when I get in an IDE. I have found it so hard to develop on windows that I downloaded emacs to Windows, and now, that's the only way I develop.

Though, I have to look at the docs quite often usually have the docs up in one window and emacs in the other. I think that keeps me honest about how much I actually know whatever it is I'm using -- If I'm spending too much time looking up the docs/stack overflow for a particular tool, that is an easy way to gauge how proficient I am.


Have you looked at IntelliJ? Their RoR stuff is really really good, and as IDE it's lightyears ahead of Eclipse or Netbeans, or even VS.


It is probably worth mentioning that el-get is another pretty solid alternative of pallet. I have not tried it though, so if anyone has any comparisons between them, I will love to hear.


I love the status bar theme, it mimics Vim's Powerline plugin. Does anyone what package that is?


The package is from - https://github.com/jonathanchu/emacs-powerline but some of my own customizations. (Author of article here!)


This is a great article, thanks. I've been itching to completely customize my emacs experience for a while, but have been avoiding it due to the large up front time investment. I think that this will help a lot.


Looks great i was not aware of that! Btw... what is that emacs theme ?


I'm pretty sure it's buried somewhere in his manifest/cask file.

https://gist.github.com/gnufied/7160410

Looks like it says: (depends-on "color-theme-sanityinc-tomorrow") ... (depends-on "noctilux-theme") ... (depends-on "soft-morning-theme")

Sorry, I didn't look into those, but saw he didn't respond. Good luck!


Sorry for not responding earlier it is - https://github.com/mswift42/soft-morning-theme


Wow, thanks for the tip about web-mode, I did not know about that one. I remember trying "mmm-mode" or something many years ago, and it was just too buggy to work with, but web-mode has worked with everything I've tried so far :-)


Rather than do (load "01blah.el") (load "02blah.el") one could use activator--https://github.com/apgwoz/activator-el which automates that.


use-package is also an amazing way to clean up your init files.

https://github.com/jwiegley/use-package


Didn't know about enhanced-ruby-mode. I will check it out. Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: