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
vim: how to press <enter> after execution of external cmd
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
  6 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
 
ping  
View profile  
 More options Jul 31 2012, 5:38 pm
From: ping <songpingem...@gmail.com>
Date: Tue, 31 Jul 2012 17:38:47 -0400
Local: Tues, Jul 31 2012 5:38 pm
Subject: vim: how to press <enter> after execution of external cmd
hi experts:
I now everything after
:!ext-prog
will be treated as param of that ext-prog. so I can't
:!ext-prog param1 param2 <enter>
but then how to avoid keep typing <enter> in following cases?

command! AsciidocA call s:Asciidoc2All()

function! s:Asciidoc2All()
     w|!asciidoc -a toc -a toclevels=6 -o
/mnt/public_html/temp/%:t:r.html "%"
     w|!asciidoc -b odt -o ~/Dropbox/temp-transfer/%:t:r.fodt "%"
     w|!asciidoc -b odp -o ~/Dropbox/temp-transfer/%:t:r.fodp "%"
     w|!a2x -f pdf --verbose --no-xmllint "%"
endfunction

I tried following doesn't work:

command! AsciidocA call s:Asciidoc2All()

function! s:Asciidoc2All()
     w|!asciidoc -a toc -a toclevels=6 -o
/mnt/public_html/temp/%:t:r.html "%"
     <enter>
     w|!asciidoc -b odt -o ~/Dropbox/temp-transfer/%:t:r.fodt "%"
     <enter>
     w|!asciidoc -b odp -o ~/Dropbox/temp-transfer/%:t:r.fodp "%"
     <enter>
     w|!a2x -f pdf --verbose --no-xmllint "%"
endfunction


 
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 Schmidt  
View profile  
 More options Jul 31 2012, 8:17 pm
From: Ben Schmidt <mail_ben_schm...@yahoo.com.au>
Date: Wed, 01 Aug 2012 10:17:20 +1000
Local: Tues, Jul 31 2012 8:17 pm
Subject: Re: vim: how to press <enter> after execution of external cmd
On 1/08/12 7:38 AM, ping wrote:

:help :silent

?

Ben.


 
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.
ping  
View profile  
 More options Jul 31 2012, 10:34 pm
From: ping <songpingem...@gmail.com>
Date: Tue, 31 Jul 2012 22:34:58 -0400
Local: Tues, Jul 31 2012 10:34 pm
Subject: Re: vim: how to press <enter> after execution of external cmd
On 7/31/2012 8:17 PM, Ben Schmidt wrote:

thanks, but...
I tried following, still I need to press 4 enter...

  function! s:Asciidoc2All()
      let a:destdir = "/Dropbox/temp-transfer/"
      let a:filebasename = "%:t:r"
      let tohtml = "silent w|!asciidoc -a toc -a toclevels=6      -o" .
a:destdir . "/" . a:filebasename . ".html \"%\""
      let tofodt = "silent w|!asciidoc -b odt                     -o" .
a:destdir . "/" . a:filebasename . ".fodt \"%\""
      let tofodp = "silent w|!asciidoc -b odp                     -o" .
a:destdir . "/" . a:filebasename . ".fodp \"%\""
      let topdf  = "silent w|!a2x -f pdf --verbose --no-xmllint -D"   .
a:destdir . "/" .                  " \"%\""
      execute tohtml
      execute tofodt
      execute tofodp
      execute topdf
  endfunction


 
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 Schmidt  
View profile  
 More options Jul 31 2012, 10:52 pm
From: Ben Schmidt <mail_ben_schm...@yahoo.com.au>
Date: Wed, 01 Aug 2012 12:52:24 +1000
Local: Tues, Jul 31 2012 10:52 pm
Subject: Re: vim: how to press <enter> after execution of external cmd

:silent will only apply to :w where you have placed it. You probably
want it to apply to the shell command by putting it between the | and
the !, or to the whole lot by putting it before :execute.

Ben.


 
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.
ping  
View profile  
 More options Jul 31 2012, 11:05 pm
From: ping <songpingem...@gmail.com>
Date: Tue, 31 Jul 2012 23:05:50 -0400
Local: Tues, Jul 31 2012 11:05 pm
Subject: Re: vim: how to press <enter> after execution of external cmd
On 7/31/2012 10:52 PM, Ben Schmidt wrote:

that works, again..
thanks!

b.t.w, just curious is there anything about vim that you don't know of? :D


 
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 Schmidt  
View profile  
 More options Aug 1 2012, 2:48 am
From: Ben Schmidt <mail_ben_schm...@yahoo.com.au>
Date: Wed, 01 Aug 2012 16:48:23 +1000
Local: Wed, Aug 1 2012 2:48 am
Subject: Re: vim: how to press <enter> after execution of external cmd
On 1/08/12 1:05 PM, ping wrote:

> b.t.w, just curious is there anything about vim that you don't know of? :D

Yeah, but I try not to answer those questions.

Smiles,

Ben.


 
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 »