Not a sandwich, but a Vim Which!

Posted by hank, Mon Mar 26 18:40:00 UTC 2007

I often find myself going to find scripts I’ve written that I want to edit, but I decided today I’d make things easier on myself:


hank@rura-penthe ~ $ cat bin/vimwhich 
#!/bin/bash
vim `which $1`

All this does is shorten vim `which myscript` to vimwhich myscript. Helpful for just a couple lines of code.

Tags:

Comments

  • photo of Tarmo Tarmo
    March 27, 2007 @ 08:18 AM

    If you used zsh (which does many things better than bash) you could just use: vim =scriptname

  • no avatar available for dayne dayne
    March 27, 2007 @ 07:02 PM

    or you can use bash alias (since bash rocks so much) function vimwhich(){ vim which $1; };

Have your say

A name is required. You may use Markdown in your comments.