On Sun, Dec 14, 2008 at 2:49 AM, bgold12 wrote: > > Hey, > > I've just discovered this amazing thing where I can call vim from the > Windows Command Prompt and execute a command directly with the -c > flag, which makes a certain C program I'm trying to write easier. But > I've also discovered that when I do this from the command prompt > myself (i.e. not from a program), and when I pipe input from the > cygwin ls command to vim, I get a strange error message, and then vim > freezes. For example, I'll type the following in Command Prompt and > press enter: > > ls |vim -c "normal ia"
Running vim that way uses the output of 'ls' as commands to execute. For example: echo -e "ihello\e:w! /tmp/vimout.txt\n:q\n" | vim would use vim to do about the same thing as echo "hello" >/tmp/vimout.txt What you were looking for is something like ls | vim - where the dash at the end tells vim to treat the text on its standard input as a buffer to be edited, rather than commands to be run. ~Matt --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
