Loading ...
Sorry, an error occurred while loading the content.

using % inside quotes (" ") - e.g. ':call ScreenShellSend("echo %:p")'

Expand Messages
  • peiman khosravi
    Dear all, ... Where %:p should be replaced by the current file path. For obvious reasons this doesn t work so I get echo %:p in the terminal instead. Is
    Message 1 of 4 , May 19, 2013
    • 0 Attachment
      Dear all, 

      I am trying to run this command:

      :call ScreenShellSend("echo %:p") 

      Where %:p should be replaced by the current file path. For obvious reasons this doesn't work so I get 'echo %:p' in the terminal instead. Is there a workaround for this?

      Many thanks in advance
      Peiman





      www.peimankhosravi.co.uk || Subscribe to RSS Feed

      To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section.

      --
      --
      You received this message from the "vim_mac" 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
       
      ---
      You received this message because you are subscribed to the Google Groups "vim_mac" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
       
       
    • peiman khosravi
      ... *www.peimankhosravi.co.uk* || Subscribe to RSS Feed *To receive emails about upcoming concerts visit this
      Message 2 of 4 , May 19, 2013
      • 0 Attachment
        Here is the solution: 

        :call ScreenShellSend(printf('echo "%s"', expand("%:p"))) 






        www.peimankhosravi.co.uk || Subscribe to RSS Feed

        To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section.



        On 19 May 2013 14:49, peiman khosravi <peimankhosravi@...> wrote:
        Dear all, 

        I am trying to run this command:

        :call ScreenShellSend("echo %:p") 

        Where %:p should be replaced by the current file path. For obvious reasons this doesn't work so I get 'echo %:p' in the terminal instead. Is there a workaround for this?

        Many thanks in advance
        Peiman





        www.peimankhosravi.co.uk || Subscribe to RSS Feed

        To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section.


        --
        --
        You received this message from the "vim_mac" 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
         
        ---
        You received this message because you are subscribed to the Google Groups "vim_mac" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
         
         
      • Tony Mechelynck
        ... In addition to what you found, the following (without backticks) will ... Best regards, Tony. -- I ve seen, I SAY, I ve seen better heads on a mug of
        Message 3 of 4 , May 20, 2013
        • 0 Attachment
          On May 19, 3:49 pm, peiman khosravi <peimankhosr...@...> wrote:
          > Dear all,
          >
          > I am trying to run this command:
          >
          > :call ScreenShellSend("echo %:p")
          >
          > Where %:p should be replaced by the current file path. For obvious reasons
          > this doesn't work so I get 'echo %:p' in the terminal instead. Is there a
          > workaround for this?
          >
          > Many thanks in advance
          > Peiman
          In addition to what you found, the following (without backticks) will
          also work:

          :call ScreenShellSend('echo ' . expand('%:p'))


          Best regards,
          Tony.
          --
          "I've seen, I SAY, I've seen better heads on a mug of beer"
          -- Senator Claghorn

          --
          --
          You received this message from the "vim_mac" 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

          ---
          You received this message because you are subscribed to the Google Groups "vim_mac" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • peiman khosravi
          Thanks very much. That s much more concise. Best, Peiman *www.peimankhosravi.co.uk* || Subscribe to RSS Feed *To
          Message 4 of 4 , May 20, 2013
          • 0 Attachment
            Thanks very much. That's much more concise. 

            Best,
            Peiman






            www.peimankhosravi.co.uk || Subscribe to RSS Feed

            To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section.



            On 20 May 2013 14:24, Tony Mechelynck <antoine.mechelynck@...> wrote:
            On May 19, 3:49 pm, peiman khosravi <peimankhosr...@...> wrote:
            > Dear all,
            >
            > I am trying to run this command:
            >
            > :call ScreenShellSend("echo %:p")
            >
            > Where %:p should be replaced by the current file path. For obvious reasons
            > this doesn't work so I get 'echo %:p' in the terminal instead. Is there a
            > workaround for this?
            >
            > Many thanks in advance
            > Peiman
            In addition to what you found, the following (without backticks) will
            also work:

            :call ScreenShellSend('echo ' . expand('%:p'))


            Best regards,
            Tony.
            --
            "I've seen, I SAY, I've seen better heads on a mug of beer"
                            -- Senator Claghorn

            --
            --
            You received this message from the "vim_mac" 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

            ---
            You received this message because you are subscribed to the Google Groups "vim_mac" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.



            --
            --
            You received this message from the "vim_mac" 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
             
            ---
            You received this message because you are subscribed to the Google Groups "vim_mac" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
             
             
          Your message has been successfully submitted and would be delivered to recipients shortly.