Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Substituting grep (and other) output to open files in Vim



2011/5/10 Jérémie Roquet <arkanosis@xxxxxxxxx>:

> vim() {
>  if test -r $1; then
>    command vim $1
>  else
>    args=(${(s.:.)1})
>    [[ $args[2] = <-> ]] && command vim $args[1] +$args[2] || command
> vim $args[1]
>  fi
> }

Perfect, thanks.


Richard



Messages sorted by: Reverse Date, Date, Thread, Author