gd0t.com

getting CMD-T in vim for free (:e **/)

just open vim from the root of your project and issue

:e **/

then just start typing the name of your file and hit tab for completion. I haven't actually used textmate, I just saw cmd-t over our new devs shoulder the other day and immediately asked #vim how to get that functionality, expecting to use a plugin (one exists of course). However some wise one told me the above. It's kind of slow if you have a large tree. I have 30k~ and it takes ~.5 seconds from the root to find a deep file. But switching files in the directory once you've opened it is fast.

But.. it's great. It's mapped to ,e and I use it dozens of times a day.

I've used vim for 4+ hours in a day probably 500 or so times. Conservatively 2000 hours with vim. Not a master by any stretch but a very happy amateur. Most of that time I've worked with single buffer vim instances (however many I needed.. 2-4 usually) arranged with xmonad.

However when I switched to a laptop and went from two huge monitors to one 14 incher, it really drove me to figure out handling easy file switching in vim. On my laptop I use a combination of virtual desktops and buffers via :bNext (or :b as it's known in my head) with help from :e **/

tabs in vim

You will also like tabs in vim.

:tabnew

gt to switch tabs.

gvim has menubar equivalents, but the finger interface works in either one.