I didn't follow your example exactly, but I think it is similar to what I'd do with Emacs macros. I would record things like "move cursor to end of word", "skip two words", "capitalize word" and so on, which were all available as keyboard shortcuts, and then just press "repeat macro five times", done.
I enjoyed working like that, also because one feels rather clever doing such things, but as I said, it didn't come up that much anymore with Eclipse. I am also not sure if I was really that much faster, because I often had to look up stuff like how to skip a word and so on.
However, I am very curious about vim and Emacs, as I am currently considering to switch back. Mostly I would really like an editor that allows me to extend it myself quickly. One can write Eclipse plugins, but I don't know how complicated it is. Maybe not that complicated - but it certainly would have to be in Java, which I'd like to get away from.
Probably I'll switch back to Emacs, as I already know it a little bit. I am worried that Emacs LISP is too messy to be worthwhile to learn, though (I am more of a Scheme person, I guess).
I never knew Vim was so extendible, it certainly sounds very interesting. I am not much of a Unix shell wizard, though - although I wouldn't mind becoming better at that, either (I've read that extending Vim draws on shell commands?).
Btw., what made me switch to Eclipse was a project that Emacs couldn't handle. It was J2ME programming, and back then as much code as possible had to go into one file. So I had a 10000 lines code file, and Emacs would just crash or not do much. It was also impossible to navigate without the "abstract code view" (which let's you click on methods and jump to their position in the code). My colleagues were using Eclipse and laughing about me... There are other niceties about Eclipse, like the local history or good svn integration.
It certainly seems a bit of a drag to set up Emacs for coding again (Ruby on Rails would be my next target). It can do a lot of things, like jumping to code snippets and so on, but first you have to set it up, somehow. As I said, I am lazy, I'd rather have an Editor or IDE that is configured properly out of the box.
I wasn't so impressed with Netbeans for RoR, though. Didn't look at it for long, but it didn't even help you fill in the parameters for the code generators - it merely provided some buttons to run them. If I could extend my editor easily, I would make something better (hopefully I will).
I am also not sure if I was really that much faster, because I often had to look up stuff like how to skip a word and so on.
But that is the reason that I love it in vim. Because of the lack of mouse support and the powerful ways to move around in Normal mode, learning the different movement commands is a must. Then, when you go to build macros, you're using the same commands you always do.
How long do you reckon would it take learn the commands? I wouldn't mind being good at that...
Edit: I am suddenly intrigued to learn Vim. Is there a mode for editing MZScheme? Or what is the best way to program MZScheme with Vim? Ruby on Rails would also be of interest. JavaScript?
I'm still learning more commands, actually. h j k l w b { and } are some good ones to start with, and then once you find yourself using those all the time, you can pull out a vim cheat sheat and learn some more, like e ( ) # and *, and so on...
I have not yet found a language that doesn't have a vim mode, at least in my Gentoo installation. This includes HTML, CSS, Lisp, C, Python, Xorg.conf, various Gentoo system files, httpd.conf, and anything else I've seen.
So I had a 10000 lines code file, and Emacs would just crash or not do much.
That's suprising. What version of Emacs was this and what kind of machine did you have? How did you configure it? Anything capable of running Eclipse should have no problem running Emacs. And as far as clicking on methods and jumping to places in the code goes, Emacs+etags (and M-x visit-tags-table) have been doing that pretty well for the past 15 years.
It was maybe 5 years ago, and I was probably running that Java IDE "plugin" for Emacs, too. Might have been version 18.x, and a computer with 600MhZ CPU, 256MB RAM.
I know about etags, but that is just the thing: you have to set it up and run it regularly. Also, it did not work as well as an IDE that really understands the code (etags don't understand the code). At least that was my impression - my "jumps" in Emacs would frequently lead to the wrong place.
Edit: also, what I meant for navigation was the code outline. In an IDE, you get an extra window listing only the methods you defined in your code. You can click on a method and jump right to the code. The IDE thing for emacs did that, too, but not as nicely (it was in a weird sidebar without proper scrollbars, for one thing).
That is also a Java sickness of course, that there are zillions of interfaces and abstract classes with the same name (BlubInterface, AbstractBlubBase, BlubImpl). But Eclipse then gives you a popup where you can select the proper class (showing the classes hierarchically).
I enjoyed working like that, also because one feels rather clever doing such things, but as I said, it didn't come up that much anymore with Eclipse. I am also not sure if I was really that much faster, because I often had to look up stuff like how to skip a word and so on.
However, I am very curious about vim and Emacs, as I am currently considering to switch back. Mostly I would really like an editor that allows me to extend it myself quickly. One can write Eclipse plugins, but I don't know how complicated it is. Maybe not that complicated - but it certainly would have to be in Java, which I'd like to get away from.
Probably I'll switch back to Emacs, as I already know it a little bit. I am worried that Emacs LISP is too messy to be worthwhile to learn, though (I am more of a Scheme person, I guess).
I never knew Vim was so extendible, it certainly sounds very interesting. I am not much of a Unix shell wizard, though - although I wouldn't mind becoming better at that, either (I've read that extending Vim draws on shell commands?).
Btw., what made me switch to Eclipse was a project that Emacs couldn't handle. It was J2ME programming, and back then as much code as possible had to go into one file. So I had a 10000 lines code file, and Emacs would just crash or not do much. It was also impossible to navigate without the "abstract code view" (which let's you click on methods and jump to their position in the code). My colleagues were using Eclipse and laughing about me... There are other niceties about Eclipse, like the local history or good svn integration.
It certainly seems a bit of a drag to set up Emacs for coding again (Ruby on Rails would be my next target). It can do a lot of things, like jumping to code snippets and so on, but first you have to set it up, somehow. As I said, I am lazy, I'd rather have an Editor or IDE that is configured properly out of the box.
I wasn't so impressed with Netbeans for RoR, though. Didn't look at it for long, but it didn't even help you fill in the parameters for the code generators - it merely provided some buttons to run them. If I could extend my editor easily, I would make something better (hopefully I will).