11 ms·
Is there a decent editor I can extend using ruby? I keep trying to tackle emacs or vim and getting thwarted. I'm not fully convinced they're what I want, and I
by ericb 16y ago
Is there a decent editor I can extend using ruby?
I keep trying to tackle emacs or vim and getting thwarted. I'm not fully convinced they're what I want, and I feel like I won't know until I spend a year learning one, and by then I'll be wondering if I like it because it is awesome or because I have Stockholm syndrome.
- JoachimSchipper 16y agoVim? See http://vimdoc.sourceforge.net/htmldoc/if_ruby.html http://vimdoc.sourceforge.net/htmldoc/if_ruby.html. (This, of course, depends on the level of integration you want. The above interface does require you to drop down to (generated) vimscript for many things.)
- iron_ball 16y agoNot with Ruby, but I recommend jEdit -- it has 80% of the power of emacs/vi with 20% of the learning curve, and you can write macros and plugins in Beanshell, a lightweight scripting language that feels somewhere between Java and JavaScript. Though honestly I've never even needed to -- the built-in commands, easily-recordable macros, and decent plugin selection have always done the job.
- fakeempire 16y ago80% of the power? You're missing the point. magit, org, dired, killring, ido, mingus, tramp, (can jedit use pyflakes or similar), shell, term, gnus, vcs-mode, etc etc etc. the only thing i have to leave emacs for is a decent browser. pretty sure jedit couldn't provide me with the same. and i just do python programming. million more modes for different tasks?
- iron_ball 16y agojEdit has 80% of emacs's text editing power. It does have a kill ring, registers, marks, etc, because those are all text editing features. Its file browser pane handles most dired-type stuff. Shell/console, ssh, version control, transparent FTP in the file browser, all available as plugins. There's a plugin to open files and switch buffers in an increment-search fashion, like ido. There's no pyflakes integration, but there are lint plugins that interface with the error list, so a pyflakes one shouldn't be hard to hand-roll. If solving your own problems with elisp is a virtue, so is solving your own problems with Beanshell. In jEdit, a "mode" is just a syntax highlighting scheme, but a plugin can set up special behaviors to deal with certain file types -- just like an emacs mode. Major and minor modes are possible, though not with those names. There's no mingus. That's a text editor function? Ditto org; there are more focused apps for that. There are newsreaders, though I don't know why. So the answer is, yes, jEdit can do most of that. However, I understand that if you're very accustomed to emacs, an emacs-style interface to daily tasks is better than whatever a standalone app might have. If so, that's fine; but don't accuse me of missing the point. We just have different points. I want a really good text editor; if it does other stuff, great. jEdit is a really good text editor.
- fakeempire 16y agoEmacs isn't a good text editor. vi is a far superior text editor if you want to only edit text. But thats the point, people that really use emacs dont just edit text in it. They live in it. Your filebrowser pane isnt the same. In emacs dired is an actual buffers that you act on in the same way you act on other buffers, same with magit (this is the best interface to VC i've ever used), same with mingus (front end for mpd, btw) and every other mode. So thats where our communication breaks down. Emacs isnt a good text editor. The entire emacs environment is where the value is. If you just want to make edits on files, use vi. its faster than anything to do that (I used vi exclusively for over a decade). I know jedit is nice too. But if you spend 8 hours a day programming then the value of emacs can shine. And the real point is, if you spend that much time programming then its silly to worry about the initial learning curve. Who cares about that time, it will be paid back infinitely over your career. But as always, its a useless debate. You can't understand the value of something until you actually use it. That goes for both of us, I'm not just taking a snipe at you.
- iron_ball 16y agoPerhaps I'm missing a nuance, but I think what you're saying is that you prefer to use the overall emacs workflow for all your tasks -- emacs as OS, UI, and human interface guidelines all in one. I find no fault in that! And who knows, if I took the time to master emacs, maybe I'd prefer it as well.
- davidw 16y agoI started my career doing Perl CGI stuff, and have used, at various points, C, Python, Tcl, PHP, Erlang, Javascript and Ruby in addition to Java, Docbook, LaTeX, HTML (of course), CSS and various and sundry other things. Emacs has handled them all with aplomb.
- sqrt17 16y agoI think he's going in the other direction: All he knows is Ruby, yet he wants to extend his editor with additional functionality. (Which is less than useful IMO, because most of the time you don't really want to extend your editor in the sense of programming new things. My .emacs invariably has 40-50 lines, but none of them should be called programming).
- ericb 16y agoI know many langauges, but I enjoy ruby the most. I'm not sure why programming an IDE and running arbitrary ruby programs wouldn't be useful? I can make a one-liner in ruby to do what I want as fast as I can make a macro, generally. Moving files and directories, find and replace with conditional logic, running cleanup scripts, after-update hooks, generated files. Those are just a couple of things I might use it for, and I'd like it in the IDE so I can just work out of there. The point of programming is that it lets me do anything.
- draegtun 16y agoAnd other people do agree with you. For eg. In Perl there is big momentum behind Padre (http://padre.perlide.org/ http://padre.perlide.org/) and there are similar projects in Python (quick google shows Leo & Pyk).
- ptomato 16y agoYou could try http://purepistos.net/diakonos/ http://purepistos.net/diakonos/
- draegtun 16y agoHave a look at Redcar: http://github.com/danlucraft/redcar http://github.com/danlucraft/redcar Also try Textmate. Can't be extended (directly) with Ruby but it does rely heavily on Unix shell for lots of its stuff (usually Ruby scripts).