News for hackers. Stuff that matters.
Re:Why Emacs is great - SLIME repl for developing in-browser... by emef on Monday November 29, 2010 @05:40PM (#1952123)
This is the kind of reason I switched from vi/vim for code editing. There is so much available power and flexibility in emacs, and it really makes things fun.
Re:Why Emacs is great - SLIME repl for developing in-browser... by aidenn0 on Monday November 29, 2010 @08:30PM (#1952660)
Would a SLIME-like frontend for vim have kept you on vim, or is it the extensibility of EMACS in general that caused you to switch?
Re:Why Emacs is great - SLIME repl for developing in-browser... by nimms on Monday November 29, 2010 @10:49PM (#1952982)
I switched from VIM to emacs. While a lot of the nice things in emacs can eventually be backported into vim, I think the extensibility and apples all/most of the way down approach of emacs is superior. Even after using it for 6 years, I'm continually astounded by the things people do with it.

I've just discovered pabbrev-mode for js and ruby editing. It's off the hook.

Also once you've coded with a repl in an inferior shell buffer, you won't know how you ever did without it

Re:Why Emacs is great - SLIME repl for developing in-browser... by silentbicycle on Monday November 29, 2010 @10:52PM (#1952998)
While the extensibility of Emacs could be ported to vi, it isn't fitting with the culture/design. The best summary I've heard is that vi is an editor, Emacs is an environment. (I prefer vi as an editor, but use Emacs. Go figure.)

pabbrev rocks! The fact that you can just add that sort of functionality to Emacs is telling.

Re:Why Emacs is great - SLIME repl for developing in-browser... by nimms on Tuesday November 30, 2010 @09:24AM (#1954153)
yeah, I think a lot of the frustration with the emacs editing experience comes down to its standard keybindings. While on a level they do make sense, there's far too much cruft and history in them. Having to type multiple keystrokes to do things like save files, switch buffers, split windows etc is pretty poor in this day and age. I used to use vimpulse until I discovered ergo-emacs. It provides a really good set of alt keybindings for the most common emacs commands. Makes using emacs so much nicer
Re:Why Emacs is great - SLIME repl for developing in-browser... by evanrmurphy on Tuesday November 30, 2010 @02:43AM (#1953456)
Thanks for sharing, I didn't know about pabbrev-mode! This should help me show the IDE guys that Emacs can still dance. ;)
Re:Why Emacs is great - SLIME repl for developing in-browser... by evanrmurphy on Tuesday November 30, 2010 @02:35AM (#1953453)
I was a vim user and made the switch to Emacs. After finding out about Viper [1] I had to try it. If what you love about vim is the genius key bindings and modal editing, you don't really have anything to lose.

In that sense, you could say I never did switch to Emacs, since I never really got fluent in the default key bindings for basic editing in Emacs (always use the vim/Viper ones). So when I'm in an unfamiliar environment that doesn't have my personalizations, I still load up vi or vim before Emacs. :)

---

[1] http://www.delorie.com/gnu/docs/emacs/viper.html

Re:Why Emacs is great - SLIME repl for developing in-browser... by iopuy on Tuesday November 30, 2010 @05:33AM (#1953714)
This is actually a common overstatement of the benefits of Emacs. The beauty of vim besides the modal editing approach is its lightweight footprint. While Emacs may be able to replicate the keybindings and modes, it cannot match the file load times or memory usage of vim. The reason I continue to use vim is because I edit dozens of files a day. I am in and out of my editor 50 times a day, Emacs just can not and does not support this approach.
Re:Why Emacs is great - SLIME repl for developing in-browser... by cadencemcshane on Tuesday November 30, 2010 @05:52AM (#1953746)
> I am in and out of my editor 50 times a day, Emacs just can not and does not support this approach.

This is true. I think the typical approach with Emacs is to leave 1 instance open for a long period of time and just keep coming back to it. (This is what I do, anyway.) I don't think this is any worse in general than opening and closing the editor as needed, it's just different. Especially when you consider that you can run terminals/shells within Emacs, it's a completely inside-out workflow. Instead of:

1. do a bunch of stuff at the terminal

2. need to edit a file

3. open my editor

Once you've gotten to step 2 you're already in your editor!

Re:Why Emacs is great - SLIME repl for developing in-browser... by nimms on Tuesday November 30, 2010 @09:31AM (#1954165)
I guess it boils down to what you prefer using. Emacs is my shell, filebrowser, ftp client etc. Having a standard UI for all your text editing is pretty amazing. After all, everything inside a CLI is just text.

I run up an emacs server on startup and use emacs client to connect to it. It gives me the instant on of VI, plus the power of all the plugins and tweaks I've made to my emacs config.

These days, most coders using vim or gvim have a pretty large config setup which takes as long as emacs to startup anyway.

Re:Why Emacs is great - SLIME repl for developing in-browser... by antileet on Tuesday November 30, 2010 @05:49AM (#1953742)
I'm a vim user, not an Emacs user (though I have dabbled with emacs before). If you still use vim on the console, you can do a lot better.

There's a reason why vim has support for multiple buffers. That you can keep multiple files open simultaneously. Read about vim remoting, and you can use a single gvim instance (which offers better performance and font rendering), and edit all files in just that.

Even in emacs, buffers are everything. Nobody opens a new instance of emacs for each file.

Re:Why Emacs is great - SLIME repl for developing in-browser... by prodigal_erik on Tuesday November 30, 2010 @06:09AM (#1953769)
Actually years ago I discovered one bewildered undergrad would run Emacs to edit a single source file, control-Z out of it, run the compiler from the shell, test, start another Emacs (after all, the shell announced the previous Emacs was "stopped"), lather-rinse-repeat until the shared host had finally died under the weight of all the suspended Emacs processes.

To sum up, nobody sane opens a new Emacs for each file. VISUAL=emacsclient is your friend, as are Dired and M-x compile....

Re:Why Emacs is great - SLIME repl for developing in-browser... by aidenn0 on Tuesday November 30, 2010 @04:52PM (#1955724)
I tried viper, and even customized it to be more like vim, but still run into issues, e.g.: * If I hit escape followed by <something> it often doesn't do what I want * Various major modes lose the vi keybindings
Re:Why Emacs is great - SLIME repl for developing in-browser... by emef on Wednesday December 01, 2010 @11:47AM (#1958474)
Emacs really feels like an IDE. But not just some normal IDE, one that I can hand customize the shit out of to do what I want it to _easily_ (which is important).

If vim had a SLIME like frontend I may not have switched in the first place, but now that I know emacs I don't think I would go back to full-time vim.

Vim is still great for quick change editing due to it's awesome load time and superior default keybindings.

Re:Why Emacs is great - SLIME repl for developing in-browser... by bretthoerner on Monday November 29, 2010 @04:13PM (#1951801)
Re:Why Emacs is great - SLIME repl for developing in-browser... by sjs on Monday November 29, 2010 @05:02PM (#1951993)
This and js2-mode make Emacs a ridiculously good JS editor.
Re:Why Emacs is great - SLIME repl for developing in-browser... by mccutchen on Monday November 29, 2010 @05:49PM (#1952158)
The last time I tried js2-mode, its indentation rules really drove me crazy. So now I use espresso-mode (which reliably indents the way I expect it to) to write my JS and turn on js2-mode to have it lint my JS.

Do you know if that has changed, or if maybe I'm missing some easy .emacs magic to make it work?

Re:Why Emacs is great - SLIME repl for developing in-browser... by johnbender on Monday November 29, 2010 @06:44PM (#1952346)
https://github.com/mitchellh/dotfiles/blob/master/emacs.d/mo...

You can steal the hooks at the bottom of the file to use the indentation of espresso mode. This was driving me insane too.

Thanks to mitchellh for publishing his dotfile :D

Re:Why Emacs is great - SLIME repl for developing in-browser... by mccutchen on Monday November 29, 2010 @07:04PM (#1952419)
This looks like it's exactly what I was looking for. Many, many thanks to you.
Re:Why Emacs is great - SLIME repl for developing in-browser... by chaitanya on Tuesday November 30, 2010 @03:44AM (#1953559)
Thanks, it was really useful for me too.
Re:Why Emacs is great - SLIME repl for developing in-browser... by mnemonik on Tuesday November 30, 2010 @04:13AM (#1953608)
I also got upset by how whimsical js2-mode can be at times. Espresso-mode (now just js-mode in emacs 23) indents perfectly, and is generally very sane, albeit somewhat boring. I use that as my major mode. However, to get the cool static analysis that I miss from js2-mode, I have flymake set up to us jslint.

http://www.emacswiki.org/emacs/FlymakeJavaScript

The combo of espresso-mode and flymake is like The Good Parts of js2-mode. Now once I add this in to the mix...

Re:Why Emacs is great - SLIME repl for developing in-browser... by jlongster on Monday November 29, 2010 @05:53PM (#1952179)
I had the same problem with js2-mode. For a while I just accepted the indentation rules and it started to make sense, and it also helped that I tweaked the code and settings to fix the real annoyances. I was pretty happy with it but I stopped doing a lot of javascript.

Not sure what the status of js2-mode is right now.

Re:Why Emacs is great - SLIME repl for developing in-browser... by nimms on Monday November 29, 2010 @10:45PM (#1952973)
the main reason I don't use js2-mode is that it breaks mumamo mode which I use in nxhtml. That said, it is a pretty amazing mode. I should look into js2-mode for js files and maybe espresso for nxhtml