On Fri, Aug 07, 2009 at 09:27:16PM +0200, [email protected] wrote: > > > > Hi, > > may be it is too late this evening > (and this is a too stupid question therefore...;) ... but... > > Is it possible to use something in the manner of > > ls -l | vim - > > and haveing vim starting up with a filled > buffer, where I only have to do a ":w" to > save, what stdin gave me to a file, which > name was give somewhere in the commandline > above. > > I dont mean to do things like > > ls -l > filename.txt && vim filename.txt > > or > > :w filename.txt > > afterwards. It should something like (this is an example. > I know, it does not work!) > > ls -l | vim --use-fname filename.txt - > > ??? > > Thank you very much for any help in advance ! > > Have a nice weekend! > Kind regards, > Meino Cramer >
While others have given perfectly satisfactory answers, I tend to use the following method quite a lot: vim filename.txt :r ! ls -l ZZ :r ! is useful for reading in stout from a variety of utilities. Handy when you're writing to a mailing list and they need stout from some program to debug it; saves mucking about cutting & pasting. Regards, -- Frank Contact info: http://www.shute.org.uk/misc/contact.html --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
