you know in my code lots of are the same in pattern. So what I want to do is to write a simple command there in case the pattern would be changed.
so system redirect is not my first choice. then I turned into external command in vim. but it's not gonna work. then I turned into vim internal command, and found that I don't know it very much. googled a lot and trying a lot but still failed. I send a mail to this mail list. so... forgive me if I ... I'm not a native speaker. you're better than me. [?] it's too late for me now. I'll try yours tomorrow. and thanks very much for your responses and such warm heart solutions. I think I need to learn more about buffer usage in vim. thanks On Tue, Nov 8, 2011 at 9:13 PM, Marc Weber <[email protected]> wrote: > Excerpts from Steve liu's message of Tue Nov 08 13:51:36 +0100 2011: > > firstly I want to direct stdout to buffer and then get it in text. but > > failed. > > redirect command and error to file > !command > file 2>&1 > > read file: > > :r file > > However then you can also use system, piping etc. > > To understand the printf issue do: > > :e NEW_FILE (Yes, I want you to open a buffer which is named NEW_FILE > sot hat you recognize this word easily) > > Then try all of these: > > :.!echo "%s\n" 'hello world' > :.!echo "%:ps\n" 'hello world' > :.!echo "\%s\n" 'hello world' > :.!echo "\s\n" 'hello world' > > echo is just as printf. But it echoes arguments only - it doesn't > process them. > > Now it you should understand what you're still doing wrong. > > Marc Weber > > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > -- steve <[email protected]> -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
<<338.gif>>
