Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Seven habits of effective text editing (moolenaar.net)
27 points by lamnk on May 14, 2010 | hide | past | favorite | 8 comments


This is solid advice. I recently returned to vim after using TextMate for a while. The strategy of noticing when you are doing something that might benefit from automation (vs trying to learn every single command) is a good one. It takes a long time to master an editor like vim.

The only thing I haven't been able to get my head around is workin with lots of files in a Django or Rails project. Nerdtree just is not as usable as the TextMate project drawer. This is especially true for a web framework where you hop from js to HTML to Python and back.


I rarely hop between those because I have 3-4 shell windows open (non overlapping, across two fairly large screens)

  - vim to edit python
  - vim to edit template/html
  - shell to run dev server / unit tests / svn commands / etc
  - either a browser window or another vim editing unit tests
I find this setup so much more enjoyable and productive than IDE or opening multiple files in one vim


While this will probably not get read, I made the move from TextMate to Vim (well, MacVim) and the efficient movement between files was the one thing I really missed - until I got fuzzyfinder-textmate set up. http://github.com/jamis/fuzzyfinder_textmate

Give it a go, it was first started by Jamis Buck and while the install can be a bit funky and is barely maintained, once you have it going it provides super efficient movement between files.


Might be worth noting in the title that this is from 2000.

TL;DR version: The habits are for users of text editors, not for the editors themselves. They are: 1. move around quickly, 2. don't type things twice, 3. fix errors quickly, 4. work effectively with groups of files, 5. provide easy use of tools outside the text editor, 6. understand and work with the structure of your text, 7. make a habit of improving your use of your text editor.

Unsurprisingly, Moolenaar (author of Vim) uses Vim for his examples, but I don't think this is primarily a propaganda exercise. Most of what he says could be applied to, say, emacs with only superficial changes.


> Unsurprisingly, Moolenaar (author of Vim) uses Vim for his examples, but I don't think this is primarily a propaganda exercise. Most of what he says could be applied to, say, emacs with only superficial changes.

Mostly true, though there was (what seemed to me to be) a somewhat thinly-veiled jab at emacs at the start of Habit 5...


You could take the beginning of habit 5 as complementary to Emacs. Has another program ever been extended to do more?

Towards the end of point 5, Bram really points out the strength of Vim over Emacs - it is small enough that it could be refactored to be embeddable. This is the real slight towards Emacs - Emacs will never be embeddable, not in a hundred years. It is the all-purpose consumer that provides little benefit to outside programs. I think Bram saw a niche in creating a 'libvim' that other programs could use


Take a look at ezbl.

Emacs doesn't even attempt to become embeddable. It instead takes the strategy of assimilating everything into a unified, tweakable UI.

Two completely different strategies, both useful in their own niches, and incredibly powerful for those who have mastered their esoteric incantations.

That being said, resistance is futile.


After reading this, I tried to :q that tab.

Had I been using the Vimperator plugin, this would have done something, I know. Maybe it's worth installing again after all. Old habits and all that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: