Sunday, December 19, 2010

Re: cygwin startup time

Hi rameo!

On So, 19 Dez 2010, rameo wrote:

> I still have problems with vim (windows native) in cygwin.
>
> example: columns.txt
>
> AX|23.45|1932323|A|VI|-|Y|0
> TY|93.45|2932323|B|VI|-|Y|1
> RE|63.25|8932323|A|VI|0|N|1
> AY|83.85|0932323|C|VI|-|Y|0
>
> command in cygwin bash:
> awk 'BEGIN{FS=OFS="|"}{print $1,$3}' c:/columns.txt
>
> gives this output:
> AX|1932323
> TY|2932323
> RE|8932323
> AY|0932323
>
> in vim command the same command (%!awk 'BEGIN{FS=OFS="|"}{print
> $1,$3}') gives an error:
> awk: 'BEGIN{FS=OFS= <C:\DOCUME~1\MYNAME\LOCALS~1\Temp\VIi129.tmp |}
> {print
> awk: ^ invalid char ''' in expression
>
> What did I wrong?

'|' is used to separate commands in Vim. Try to escape the | by either
using \| or even ^V| (where ^V is a literal Ctrl-V).

See
:h :bar
:h escape-bar

regards,
Christian

--
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

No comments: