When I first tried out Textmate, my immediate reaction was "is it me, or is Textmate modeled after emacs?". There is a lot to be said about the emacs (or vim) model of lightweight editor + macros. For those of us with *nix backgrounds, I suppose it comes with the turf
Of course, I know enough people who are super quick in Eclipse.
There used to be a really great Mac text editor called Alpha that was fully scriptable in Tcl. The only annoying thing about it was that after you had paid for it (shareware) the author wouldn't provide a build with the nagging switched off. Maybe that's one reason it seems to have vanished.
Any good introductions to vim? I did the odd editing with vim with a cheat sheet side by side, but I never heard about the "cool features" before reading Hacker News.
Re:Eclipse to Textmate: An IDEological Change
by BrandonM on Friday June 20, 2008 @11:16AM
(#222797)
I used http://jmcpherson.org/editing.html as well as a cheat sheet. There's also http://vim.org/tips/ which seems to come up a lot whenever I'm searching for specific functionality. Other than that, simply immerse yourself in vim and deal with the pain for no more than a week before you'll find that you're already becoming more efficient.
Some less-commonly-used-but-awesome features:
C-X C-F in insert mode: complete file names
C-X C-L in insert mode: complete entire lines of code
C-N, C-P in insert mode: complete word forward, previous
v (V) in edit mode: entire visual mode (visual line)
gq in visual mode: rewrap selection
>> in edit/visual mode: indent current line/selection
gg=G in edit mode: reformat indentation of entire file
@@ in edit mode: repeat last keyboard macro
There's a lot I've left out (obviously), but that's a little teaser. One paradigm I use a lot is when I need to change a variable name... this is very easy. While on the variable itself, press * to search forward for it. Then type cw to erase the word and type in the replacement, followed by ESCAPE (of course). From then on, you can use n to find the next occurrence and then type . to change the name, because . repeats the last command.Oh, and one last thing. Remap ESCAPE to CAPS LOCK, or get used to using C-[. Both are more convenient than reaching for the top corner; CAPS LOCK is superior in my experience, but it will kill you when you're on a non-mapped system.
Re:Eclipse to Textmate: An IDEological Change
by BrandonM on Friday June 20, 2008 @04:19PM
(#223174)
One more good link: http://www.viemu.com/a-why-vi-vim.html
Re:Eclipse to Textmate: An IDEological Change
by jamongkad on Friday June 20, 2008 @05:26AM
(#222600)
Hell yeah it's got cool features. Programmable macros for instance. You never have to repeat yourself every again. You could mark certain points in your code and come back to it later. Not too mention it's installed in almost every Linux Distro out there. For good documentation http://vim.wikia.com/wiki/Main_Page
On the topic of vim, I highly recommend it for those who haven't tried it out. Sit me in front of vim and a unix terminal and I can quickly do any refactoring task that needs done. I have used vim macros to turn an HTML table into a C array in a few seconds. Seriously, once you get a powerful editor, it is so flexible and applicable that you will never want to be without it. Navigating text in an editor without vim's movement commands (W, w, B, b, {, }, *, #, and so many more) is simply painful.