Start VIM in File Navigation Mode

I often find myself doing the following:

vim .

to open up VIM and then explore my files. Because I’m lazy, here’s a way to open up VIM in file navigation mode if no files are specified when running VIM.

Append the following to your .bashrc

function vim(){
    vimpath=`which vim`
    if [ "$#" -gt 0 ]
    then
        $vimpath $@
    else
        $vimpath .
    fi
}

Related Posts:

About the Author:

Joseph is the lead developer of Vert Studios, a web design company located in Tyler, Tx. Follow him on Twitter! @Joe_Query.

Add to the conversation: