Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
how to: vim -o STDIN somefile.txt
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
her  
View profile  
 More options Oct 3 2012, 8:20 pm
From: her <hernan...@hotmail.com>
Date: Wed, 3 Oct 2012 17:20:37 -0700 (PDT)
Local: Wed, Oct 3 2012 8:20 pm
Subject: how to: vim -o STDIN somefile.txt
how can i do this:

vim -o STDIN somefile.txt

what i want is something like this:

$ vim -o "some text from stdin that i typed" somefilename.txt

and vim would open horizontally splitted as in:

some text from stdin that i typed
-------------------------
stuff from somefilename.txt

--
View this message in context: http://vim.1045645.n5.nabble.com/how-to-vim-o-STDIN-somefile-txt-tp57...
Sent from the Vim - General mailing list archive at Nabble.com.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jürgen Krämer  
View profile  
 More options Oct 4 2012, 11:00 am
From: Jürgen Krämer <jottka...@googlemail.com>
Date: Thu, 04 Oct 2012 17:00:13 +0200
Local: Thurs, Oct 4 2012 11:00 am
Subject: Re: how to: vim -o STDIN somefile.txt

Hi,

her wrote:
> how can i do this:

> vim -o STDIN somefile.txt

> what i want is something like this:

> $ vim -o "some text from stdin that i typed" somefilename.txt

> and vim would open horizontally splitted as in:

> some text from stdin that i typed
> -------------------------
> stuff from somefilename.txt

  $ echo "some text from stdin that i typed" | vim - -c "sp somefilename.txt"

or

  $ cat | vim - -c "sp somefilename.txt"

Regards,
J rgen

--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us.     (Calvin)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Chase  
View profile  
 More options Oct 4 2012, 11:01 am
From: Tim Chase <v...@tim.thechases.com>
Date: Thu, 04 Oct 2012 10:02:36 -0500
Local: Thurs, Oct 4 2012 11:02 am
Subject: Re: how to: vim -o STDIN somefile.txt
On 10/03/12 19:20, her wrote:

> how can i do this:

> vim -o STDIN somefile.txt

> what i want is something like this:

> $ vim -o "some text from stdin that i typed" somefilename.txt

> and vim would open horizontally splitted as in:

> some text from stdin that i typed
> -------------------------
> stuff from somefilename.txt

I was somewhat surprised that Vim doesn't seem[1] to support
multiple filenames of which one is stdin without a workaround.  I'd
*expect* to be able to do something like

  echo "some text from stdin" | vim -o - somefile.txt

however that gives me a

  Too many edit arguments: "somefile.txt"

You can work around it with this convoluted invocation:

  echo "some text from stdin" | vim -c "sp somefile.txt" -

(or "below sp somefile.txt" depending on the order you want)

-tim

[1]
my usual caveat that this is 7.2.445 on Debian Stable, and 7.3.x is
the latest and greatest; so this may no longer be the case.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Fritz  
View profile  
 More options Oct 4 2012, 10:50 pm
From: Ben Fritz <fritzophre...@gmail.com>
Date: Thu, 4 Oct 2012 19:50:02 -0700 (PDT)
Local: Thurs, Oct 4 2012 10:50 pm
Subject: Re: how to: vim -o STDIN somefile.txt

On Thursday, October 4, 2012 10:01:54 AM UTC-5, Tim Chase wrote:

> You can work around it with this convoluted invocation:

>   echo "some text from stdin" | vim -c "sp somefile.txt" -

Or even worse for multiple files:

echo "some text from stdin" | vim -c new -c "args *.txt" -c sball -


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »