emacs: truly a textmate equivalent?

Guys,

In terms of the epic saga of vi versus emacs, I’ve always been a vi guy. However, I’ve never taken my vi knowledge to the advanced level…I know how to get around and be dangerous and know some things, but mostly I have around 20-30 key strokes available in muscle memory and that’s it.

For most of my coding, I’ve always preferred a more intuitive solution. I used UltraEdit for a long time on Windows for Java development, then switched to Linux and went with JEdit, and finally Eclipse.

I use RadRails now and love it, but it is indeed heavy and I often look over at the Textmate crowd and wonder what I’m missing. No way in hell I’ll ever buy a Mac to get access to an editor…first, Macs are extremely overpriced and Os X is an upgrade from Windows but a downgrade from Linux (yes, I have used it. I felt like someone had reinstalled my training wheels without my knowledge). You will pry Linux and cheap x86 hardware from my cold dead fingers thank you very much.

So…I hear that Emacs can do everything Textmate does and more. Having fallen on the vi side of things for so long, Emacs has been more of a curiousity than anything else…now, I find myself eyeing it as a possible new tool to learn.

So, I ask the group…A. can emacs do everything Textmate does from a Rails perspective, and B. would you recommend it as the best Rails IDE-ish thingy for us Linux guys?

Thanks!

Jake

Jake. Get a mac. Just do it. No, not just for textmate. Do it because life is easier on a mac.

Windows sucks because things just don't work. Viruses run rampant, spyware is targetted at them, and keeping your system running smooth takes time. Windows just requires time.

Linux also requires time. Time to learn how to install this, time to install that. Time to find compatible drivers for your newest equipment, time to learn commands for new programs.

Macs, on the other hand, just work. Once upon a time, I hated macs because I thought they dumbed everything down. I prided myself on knowing everything about windows, to make it do what I want faster and more efficiently. I looked down on mac users because I thought they were so computer illiterate they needed everything done for them.

Well, I was right about having everything done for them - but not the computer illiterate part. OS X does everything for me. I don't spend time cleaning it up, making it run faster, reformatting. I don't spend time finding out why a program or device won't work on my computer. I spend time enjoying myself. I spend time getting work done.

Now, I can't trash talk Linux much, because it is a wonderful OS, and if you really know what you're doing it's incredibly powerful. But for me, I would rather spend time being productive.

I know this isn't what you were asking at all, but I'm sure there's a lot of other Mac guys on this mailing list that will agree with me, and would be happy to see another computer guy switch to mac and realize what you are missing out on.

Are macs overpriced? Yes. Is every penny I spend on a mac worth it because of the amount of time I save by using a mac? Without a doubt. After 10 years of PC's, 1 year of Macs has made me despise touching a PC.

Respectfully, Ben Lisbakken

Oh, and TextMate rocks. Makes rails so much easier!

I've never used textmate so I don't know how it compares to emacs, but I do love emacs :slight_smile: The commands take awhile to get used to, but that's simply a matter of time and "practice". It's really nice, for example, to be able to copy code from an editing buffer to a console buffer without having to use your mouse or leave emacs.

For rails, you'll definitely want to install * ruby-mode * ruby-electric (this and the above come with ruby) * emacs-rails (http://rubyforge.org/projects/emacs-rails/) * mmm (some people hate mmm but I like it just fine)

emacs-rails is great - among other things, it lets you move around related files quickly. For example, if you're in the "new" action of a controller, hitting alt-shift-up will take you to the associated view template, and if your cursor (point) is over a call to a partial, hitting ctrl-enter will take you to the partial. I believe it also offers tab completion, though that might actually come from another extension.

Other helpful extensions are * ecb * semantic * color-theme

hehe... I just reread my post. Sorry for starting a holy war. You know how cultish us mac guys are! It's just that my experience has been so incredible with them, I want to share it with other people.

-Ben

hi there,

i´m a linux user and i have no plans for switching to a mac anytime soon. it´s just what i´m used to and i quite like it.

macs are great, too i guess..

but to the matters at hand:

it´s really hard to point you to a solution without more info on what you are really missing in vi/m

i use vim for rails development all the time. and for the stuff i want it to do it´s quite sufficient. you can have a project file browser on the left side with the project plugin. and if you want to, you can have a c-tags based class browser on the right side, too. for the svn part of things i usually have a seperate xterm open. some pointers on how to use vim more like an ide check this out:

http://wiki.rubyonrails.com/rails/pages/HowtoUseVimWithRails

also vim 7 supports code highlighting/completion for rhtml and rb files pretty much out of the box. for something more spiffy check here: http://blog.hasno.info/blog/segfault/dev/2006/04/10/vim-7-ruby-omni-completion.html

and here: http://www.vim.org/scripts/script.php?script_id=182

i don´t know if emacs can do all that stuff better.. never really used emacs... just wanted to give you some pointers on what can be achieved in vim, too.

kind regards and good luck finding the work environment you like,

alexander

Ben Lisbakken wrote:

In terms of the epic saga of vi versus emacs, I’ve always been a vi guy. However, I’ve never taken my vi knowledge to the advanced level…I know how to get around and be dangerous and know some things, but mostly I have around 20-30 key strokes available in muscle memory and that’s it.

[…]

So, I ask the group…A. can emacs do everything Textmate does from a Rails perspective, and B. would you recommend it as the best Rails IDE-ish thingy for us Linux guys?

Beef up that modal-editing muscle memory with vim7 and Time Pope’s inimitable rails.vim plugin: http://www.tpope.net/node/96

It’s great, especially in tandem with project.vim. Easily flip between model/units/migration/fixture and controller/functionals, run the appropriate test for the open buffer with just :Rake, enjoy the Rails-specific highlighting, pop open the console for a quick experiment, the list goes on.

jeremy

Your posts sound just like they were written by everyone on my team, all of whom switched from a variety of Windows and Linux boxes to Macintosh when we took up Rails development.

From what the other guy said though, it does indeed sound like Emacs is getting to the same place TextMate is at, especially with nice little hotkeys like the ctrl-shift-uparrow thing.

Horses for courses really, but you can run Emacs on a Mac too :wink:

Jake. Get a mac. Just do it. No, not just for textmate. Do it because life is easier on a mac.

I have a mac…or, well, my wife does. I spend quite a bit of time on it, because it’s conveniently positioned in the family room, and because she is not a computer person.

Windows sucks because things just don’t work. Viruses run rampant, spyware is targetted at them, and keeping your system running smooth

takes time. Windows just requires time.

Agreed.

Linux also requires time. Time to learn how to install this, time to

install that. Time to find compatible drivers for your newest equipment, time to learn commands for new programs.

I would’ve agreed with your argument 2 years ago, and there are still a few rough edges, but I think desktop Linux has truly arrived. Ubuntu and its ilk have made system administration and package installation easier…yes…EASIER, than Mac OS X. I speak from the perspective of having done both…trust me. There is nothing on Mac that compares to Ubuntu (and thus, Debian’s) package management system (if not fink, which is the Mac port of Debian’s packaging system.

Macs, on the other hand, just work. Once upon a time, I hated macs because I thought they dumbed everything down. I prided myself on

knowing everything about windows, to make it do what I want faster and more efficiently. I looked down on mac users because I thought they were so computer illiterate they needed everything done for them.

I don’t look down on Mac users at all. To each his own. I might smirk from time to time thinking about how much they overpaid for aesthetics (and machine aesthetics…not GUI. Linux GUI is coming along quite nicely).

Well, I was right about having everything done for them - but not the computer illiterate part. OS X does everything for me. I don’t spend

time cleaning it up, making it run faster, reformatting. I don’t spend time finding out why a program or device won’t work on my computer. I spend time enjoying myself. I spend time getting work done.

To a certain extent, I agree. OS X usually works. But when it doesn’t, you quickly realize the benefits of having the source at hand, and the drawbacks of NOT having the source. You sacrifice an overwhelming amount of flexibility when going to a Mac. And you anchor yourself to a product, not a Movement. I prefer the later.

Now, I can’t trash talk Linux much, because it is a wonderful OS, and if you really know what you’re doing it’s incredibly powerful. But for

me, I would rather spend time being productive.

I’m with you, but I find Linux to be more productive. Again, to each his own.

I know this isn’t what you were asking at all, but I’m sure there’s a lot of other Mac guys on this mailing list that will agree with me, and would be happy to see another computer guy switch to mac and realize what you are missing out on.

It’s really not, and I’d really, really like to avoid hijacking this thread to push a product I don’t really care for :wink: . It’s miles ahead of Windows, but a bit behind Linux in my experience. So please, let’s get back to the original questions.

Are macs overpriced? Yes. Is every penny I spend on a mac worth it because of the amount of time I save by using a mac? Without a doubt.

After 10 years of PC’s, 1 year of Macs has made me despise touching a PC.

We’ll agree to disagree here. Thanks!

Jake

<...>

...first, Macs are extremely overpriced

will this myth ever die?

and Os X is an upgrade from Windows but a downgrade from Linux (yes, I have used it. I felt like someone had reinstalled my training wheels without my knowledge).

<...>

Well, if you're more intersted in hacking your OS - stay with Linux. If you like your job done - buy a Mac. :wink:

Regards, Rimantas

I use RadRails now and love it, but it is indeed heavy and I often look over at the Textmate crowd and wonder what I'm missing. No way in hell I'll ever buy a Mac to get access to an editor...first, Macs are extremely overpriced and Os X is an upgrade from Windows but a downgrade from Linux (yes, I have used it. I felt like someone had reinstalled my training wheels without my knowledge). You will pry Linux and cheap x86 hardware from my cold dead fingers thank you very much.

Is $599 overpriced??? You can do EVERYTHING in MacOs you can do in Linux. That includes running ALL the software. Unless of course they were written by an idiot who specifically wrote the software for Fedora Core 3 or something stupid like that. I'm a long time Linux server admin and I managed multiple Linux workstations for a post production division. First thing I did was to remove all those advanced KDE features and stuff that were very cool but somehow just ended up being in the way. In my feeling MacOS is what Linux should aspire to be. You still have the advanced features but you are not forced to spend half your day configuring them. But to your real question.

So, I ask the group...A. can emacs do everything Textmate does from a Rails perspective, and B. would you recommend it as the best Rails IDE-ish thingy for us Linux guys?

Definitely the best you got on Linux. The power of TextMate does not lie in its snippets system (although awesome). The real power lies in it's vast and amazing text handling. The stuff you can do and all the shortcuts and little things that just makes your life easier. emacs is not only the best alternative. It's the only other thing in this class of text editors in the world. period. Of course. Some people find all the other features of IDE's more important but I find that 90% of my time I'm writing some text. So text handling is a lot more important.

Rimantas Liubertas wrote:

<...>
...first, Macs are extremely overpriced
will this myth ever die?

That is not a myth, that is a fact, atleast in my country (Norway).

My notebook, a HP pavillion dv6060ea, has 120GB harddrive, 1GB RAM, Dual Core AMD Turion X2 processor 1,8Ghz (roughly same as Intel 2,2Ghz), 15.4" WXGA (1280x800) screen, and 128MB Nvidia Go 7200 graphics(which run WoW just fine, thank you very much) at 9.995 NOK (roughly $1580).

A Macbook Pro with 15.4 WXGA, ATI X1600 graphics, Intel Core Duo 2,1 Ghz, 1GB RAM and 120GB harddrive comes at 22.310 NOK (roughly $3540).

Both prices include our sky-high 25% Sales tax.

Will you keep saying macs are not overpriced?

If it weren’t for the price (I’d accept a 20% price jump for design and aesthetics, but 120%? COME ON!) I’d be a Mac user today. Apple clearly has no plans on taking over the world, so MS can just rest easy for now.

Regards,

Henning Kilset

Listen, I will not drink the koolaid. I will not take the blue pill. I have lived on both sides of this fence, and I know what BS smells like.

I have not had to hack on my Linux boxen in years. They just work. If OS X works for you, great, but don’t drag Linux’s name through the mud just because you’re an Apple fanboy.

Sheesh, people, let’s get back to the much less controversial vim vs. emacs vs. textmate discussion. :wink:

Jake

I really wasn't going to start a war here. But since I already answered you earlier I find that I have the right to point out a few simple factual errors.

I would've agreed with your argument 2 years ago, and there are still a few rough edges, but I think desktop Linux has truly arrived. Ubuntu and its ilk have made system administration and package installation *easier*...yes....EASIER, than Mac OS X. I speak from the perspective of having done both...trust me. There is nothing on Mac that compares to Ubuntu (and thus, Debian's) package management system (if not fink, which is the Mac port of Debian's packaging system.

I don't think anyone uses fink anymore. We have our own called ports. It's far the simplest I have tested. Heck it's 5 times simpler that using gem or apt.

I don't look down on Mac users at all. To each his own. I might smirk from time to time thinking about how much they overpaid for aesthetics (and machine aesthetics...not GUI. Linux GUI is coming along quite nicely).

Good design does not mean aesthetics. A good design is something that functions well and looks good doing it. Unlike my experiences with Linux features that either functioned well or looked good. Never both. The reason why I stopped using Linux was that I was tired of always configuring. And I used Ubuntu damnit that was a dream compared to the other distros. Installing was nicer with Ubuntu though. Unless of course something didn't work. Which happened a few times.

To a certain extent, I agree. OS X usually works. But when it doesn't, you quickly realize the benefits of having the source at hand, and the drawbacks of NOT having the source.

You know. I have heard this argument so many times. But actually when I pressure people they admit that they have never looked at a single line of Linux code. Sure. A few codes in apps but you have that also in MacOS. When an installation of Ubuntu fails do you actually go to the repository and check out the code???!? I seriously doubt that.

> Are macs overpriced? Yes. Is every penny I spend on a mac worth it > because of the amount of time I save by using a mac? Without a doubt. > After 10 years of PC's, 1 year of Macs has made me despise touching a > PC. We'll agree to disagree here. Thanks!

You can't argue with numbers Jake. Macs just simply aren't overpriced. It's exactly the same price as computers from other companies in the same caliber. Of course you can find better prices by buying from a some noname company or building your own PC. But that's just a stupid waste of time.

Ok.. Now try comparing with and ACTUAL comparable machine. Do HP or Dell with the same processor and the same everything. They actually make similar macines with the same processor and so on. I just don't understand why you picked this one. I live in Iceland and I did those comparisons here and I found the prices to be similar. But compare to the standard MacBook and there is no competition. There are simply nothing in the pricerange of the MacBook standard except some outdated computers.

Listen, I will not drink the koolaid. I will not take the blue pill. I have lived on both sides of this fence, and I know what BS smells like.

I have not had to hack on my Linux boxen in years. They just work. If OS X works for you, great, but don't drag Linux's name through the mud just because you're an Apple fanboy.

Maybe I am one. My experience with Linux started some 6 years ago and I still work with it daily. My experience with MS OSes goes back to DOS5.x My experience with OS X is a bit more than a year. So I can compare, and I know what I prefere. But like you've said - to each his own.

Sheesh, people, let's get back to the much less controversial vim vs. emacs vs. textmate discussion. :wink:

Agreed. What can I say - Textmate rocks.

Regards, Rimantas

I don’t think anyone uses fink anymore. We have our own called ports. It’s far the simplest I have tested. Heck it’s 5 times simpler that using gem or apt.

My mistake…I’ll have to take a look.

Good design does not mean aesthetics. A good design is something that functions well and looks good doing it. Unlike my experiences with

Linux features that either functioned well or looked good. Never both. The reason why I stopped using Linux was that I was tired of always configuring. And I used Ubuntu damnit that was a dream compared to the

other distros. Installing was nicer with Ubuntu though. Unless of course something didn’t work. Which happened a few times.

I’m not sure you have a point here. Can you tell me how anything on Mac OS X is better “designed” than on Ubuntu? Take Apple’s terminal versus Gnome’s. Apple’s is so lacking in features it’s sad…iTerm is better but locks itself up after an hour or so…

It’s all subjective, but I personally thing Ubuntu functions well and looks good. I run it on my work laptop and my home desktop and haven’t had one issue out of it in two years. I can’t say the same out of OS X, or the miserably crappy hardware I paid twice market value for in the eCraps I have at home.

Again, Linux versus OS X aside, the Apple hardware leaves a lot to be desired. Sure, I bought the lowest priced at the time, but I paid $1800 for something that would’ve cost me $500 from Dell. Two months after I bought it, the monitor started emitted a high pitched squeal that made me want to drive an ice pick into my temple. I tried to contact Apple support, but unless you pay for their extended support you can’t call them (or you couldn’t at the time). They didn’t even make a support number available. I emailed them, and they told me to take it to their local authorized support agent (CompUSA here locally). I took it to CompUSA, and they ran Apple’s diagnostic software on it and came back with no errors (of course monitor squeals don’t emit errors). Given this they said there was nothing they could do…per Apple’s policy the machine was working as it should, and Apple would not fix the squeal unless the monitor died. They said I could try upgrading my support package and call Apple directly. I refused. After another month of miserable squealing, my wife even refused to use the machine. I bucked up and threw Apple the $160. Two days later, before calling the support, the squealing disappeared.

Bad luck aside, I’m not at all impressed with Apple’s hardware…NOR with their customer support. Searching the forums about my issue found many people in a similar boat, and each were given the same “go pound sand” directive from Apple.

You know. I have heard this argument so many times. But actually when I pressure people they admit that they have never looked at a single

line of Linux code. Sure. A few codes in apps but you have that also in MacOS. When an installation of Ubuntu fails do you actually go to the repository and check out the code??? I seriously doubt that.

We’re not just talking OS here. While I have opened up the code, I’d have to admit I was horribly unproductive at it, but was able to fix an issue or two following other’s post instructions. However, there are many times when I’d like to fix a userland tool or simply understand what it’s doing on the Mac and can’t because the source is not available. On Linux, I’m not blocked in this way. Simply reading the source for insight into a tool’s operations is sometimes invaluable.

You can’t argue with numbers Jake. Macs just simply aren’t overpriced.

It’s exactly the same price as computers from other companies in the same caliber. Of course you can find better prices by buying from a some noname company or building your own PC. But that’s just a stupid waste of time.

I call BS. You can buy much more machine for a much lower price by not buying from Apple. I’ll leave that exercise up to you, but it’s true.

Please people…I’ll defend my assertions, but no where in the subject did I ever say “OS X versus Linux: what are your thoughts”? Perhaps I’ve added some fuel here, but can we please divert back to the original topic.

And, Jon, I do appreciate your comments on emacs.

Jake

the standard MacBook and there is no competition. There are simply nothing in the pricerange of the MacBook standard except some outdated computers.

you can build an ASUS or MSI barebones for cheaper then the 'non-pro' macbook with the power of the 'pro' costing twice as much. by 'build', i mean remove the keyboard with a screwdriver, click in the hd, ram, chip, and wireless card, and close it back up. it was definitely worth it for me, as im not into paying for copies of OSX or XP that i won't be using, or a 20gb hd or 256 mb dimm that im just going to remove anyway since the upgrades are never affordable in 'build to order'.

i still thnk ~699 USD is a bit steep for a chassis and a mobo and a screen, but its still cheaper than anything but a plasticy hunk of HP crap after you add a few hundred dollars in newegg parts..

as for emacs, my introduction was when it was the only editor installed on a work machine besides vi. the main reason i use it is nobody else gets indent right. ive tried it everywhere, about 50% of editors even have an 'emacs style' tab, which claims to be but isnt. that and its nice that it understands the syntax of every file i'll ever open. whether its /etc/make.conf, aclocal.m4, some file that is 30% python 40% html 30% javascript, or even plain ol' ruby/tcl/scheme/sh..

as for OS, i ran Mac OS from 1992 to 2001, XP from 2001-2005, and Linux from 2005 onwards, since i think during those respective times, the OSes were the leaders in usability, functionality, flexibility, performance, and cool apps..for a user interested in art/design/music/software-creation..

So do you think Emacs stands up to Textmate apples for apples? Is there anything Textmate can do that Emacs can’t?

Curious as well…how do you feel vim compares?

I’m honestly not looking for a holy war, only your honest opinion.

Thanks, Jake

So do you think Emacs stands up to Textmate apples for apples? Is there anything Textmate can do that Emacs can't?

Well.. I am no emacs expert for starters. I'm not gonna claim to have used it extensively for many years writing millions of lines of code. But I have used it and many things in Textmate feel similar to both emacs and vim. Actually it's worth when using TextMate to actually try to do use a emacs or vim shortcuts. ctrl+f or b will move your cursor in similar ways, ctrl+g will change case, ctrl+w will select current word and so on. TextMate takes a lot from both those editors in terms of allowing you never to touch the mouse again. But I like my software to look good and I prefer the editor to only be complex when I'm doing complex things. emacs is always in professional mode. emacs and vim are horrific when all you wanted to do was to open up a short notes.txt file and write your friends phone number. :slight_smile:

Curious as well.....how do you feel vim compares?

vim I'm sure compares fine. Except that vim is horrificly complex and not easy to learn. vim just isn't really friendly. It's powerful as hell but it's offputting to people who don't know it. Because if you don't know how it works you don't even find a way to exit the damn software to find the manual. :slight_smile: TextMate allows you to use it as simply as notepad but when you start having the need to make more complex things you find that those features were there all along. It jut didn't foce you to use them until you were ready.

I'm honestly not looking for a holy war, only your honest opinion.

Well... I just honestly thought some of your other comments were plain wrong. I reccomend to you that next time if you don't want to start a discussion about mac vs. Linux, then don't start it. Remember that you started by making claims that MacOs was years behind Linux and that Apple was overpriced and a few more comments. You say that only few sentences after claiming that you DON'T want the discussion to revolve around those things. If you don't want a holy war. Don't bomb the church. :wink: