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

Edit result of last command



Hi

say I've done a command a find/ls whatever

eg 
>ls *add*
which returns
addition.html

I can then type
> vi $(!!)

But that's way too tiring

So I wrote the following function vr

function vr () { 
gvim.exe $($(history -1 | sed "s/^ *[0-9]* *//g")) &
}

This does the trick, but how would you zedii do it?
zzapper (vim, cygwin, wiki & zsh)
--

vim -c ":%s%s*%CyrnfrTfcbafbeROenzSZbbyranne%|:%s)[R-T]) )Ig|:norm G1VGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips



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