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

Separating multiple user-defined commands with | (bar)

Expand Messages
  • Paul
    I have the following defined in my vimrc: command! FI let &l:foldenable = ! &l:foldenable | let &foldcolumn = 5*&foldenable Sometimes, I want to do setl
    Message 1 of 8 , Sep 18, 2013
    • 0 Attachment
      I have the following defined in my vimrc:

      command! FI
      \ let &l:foldenable = ! &l:foldenable |
      \ let &foldcolumn = 5*&foldenable

      Sometimes, I want to do

      setl foldmethod=indent | FI | FI

      This generates an error about trailing characters. Prefixing the bars with backslashes do not help.

      I haven't found anything in

      :help :|

      about this. Can someone point me to the relevant reference to determine what the limiting factor is, and whether there is a way to issue multiple user-defined commands on the same line?

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

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Ben Fritz
      ... -- -- 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,
      Message 2 of 8 , Sep 18, 2013
      • 0 Attachment
        On Wednesday, September 18, 2013 2:59:13 PM UTC-5, Paul wrote:
        > I have the following defined in my vimrc:
        >
        > command! FI
        > \ let &l:foldenable = ! &l:foldenable |
        > \ let &foldcolumn = 5*&foldenable
        >
        > Sometimes, I want to do
        >
        > setl foldmethod=indent | FI | FI
        >
        > This generates an error about trailing characters. Prefixing the bars with backslashes do not help.
        >
        > I haven't found anything in
        >
        > :help :|
        >
        > about this. Can someone point me to the relevant reference to determine what the limiting factor is, and whether there is a way to issue multiple user-defined commands on the same line?

        :he :command-bar

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

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Paul
        ... That certainly helped. Thanks, Ben. -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are
        Message 3 of 8 , Sep 18, 2013
        • 0 Attachment
          On Wednesday, September 18, 2013, Ben Fritz wrote:
          > :he :command-bar

          That certainly helped. Thanks, Ben.

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

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Sam Fourman Jr.
          ... so what is the correct way to say | is it actually bar? I have always called it pipe.... -- Sam Fourman Jr. -- -- You received this message from the
          Message 4 of 8 , Sep 18, 2013
          • 0 Attachment



            On Wed, Sep 18, 2013 at 4:47 PM, Paul <paul.domaskis@...> wrote:
            On Wednesday, September 18, 2013, Ben Fritz wrote:
            > :he :command-bar

            That certainly helped.  Thanks, Ben.


            so what is the correct way to say | is it actually bar?
            I have always called it pipe.... 
            --

            Sam Fourman Jr.

            --
            --
            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
             
            ---
            You received this message because you are subscribed to the Google Groups "vim_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • Paul
            ... In the unix bash command shell, using | to separate commands creates a pipe from the standard out of one command to the standard in of the next. So maybe
            Message 5 of 8 , Sep 18, 2013
            • 0 Attachment
              On Wednesday, September 18, Sam Fourman Jr. wrote:
              > ...what is the correct way to say | is it actually bar? I have
              > always called it pipe....

              In the unix bash command shell, using | to separate commands creates a pipe from the standard out of one command to the standard in of the next. So maybe "pipe" would be appropriate there. In vim, it serves only to separate commands, so it could be confusing to refer to it as a "pipe". That's my perspective, anyway.

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

              ---
              You received this message because you are subscribed to the Google Groups "vim_use" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            • Gary Johnson
              ... It depends on the context in which it s being used. http://www.unicode.org/charts/charindex.html, uses the terms vertical line vertical bar absolute value
              Message 6 of 8 , Sep 18, 2013
              • 0 Attachment
                On 2013-09-18, Sam Fourman Jr. wrote:
                >
                > On Wed, Sep 18, 2013 at 4:47 PM, Paul wrote:
                >
                > On Wednesday, September 18, 2013, Ben Fritz wrote:
                > > :he :command-bar
                >
                > That certainly helped.  Thanks, Ben.
                >
                > so what is the correct way to say | is it actually bar?
                > I have always called it pipe.... 

                It depends on the context in which it's being used.

                http://www.unicode.org/charts/charindex.html, uses the terms

                vertical line
                vertical bar
                absolute value

                in that order of preference.

                http://www.codinghorror.com/blog/2008/06/ascii-pronunciation-rules-for-programmers.html
                lists these alternatives:

                bar
                or
                or-bar
                v-bar
                pipe
                vertical bar
                vertical line
                gozinta
                thru
                pipesinta
                spike

                I think it is properly called a pipe only in the context of a shell.

                All of that is the result of a quick Google search, so I wouldn't
                call it authoritative. I did not find the name used, if any, by the
                original ASCII standard.

                Regards,
                Gary

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

                ---
                You received this message because you are subscribed to the Google Groups "vim_use" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              • Sam Fourman Jr.
                ... Thanks for the input guys. I was thinking of actually making a few FreeBSD tutorial videos.. then show the install of vim/gvim.. and that got me thinking..
                Message 7 of 8 , Sep 19, 2013
                • 0 Attachment



                  On Wed, Sep 18, 2013 at 6:48 PM, Gary Johnson <garyjohn@...> wrote:
                  On 2013-09-18, Sam Fourman Jr. wrote:
                  >
                  > On Wed, Sep 18, 2013 at 4:47 PM, Paul wrote:
                  >
                  >     On Wednesday, September 18, 2013, Ben Fritz wrote:
                  >     > :he :command-bar
                  >
                  >     That certainly helped.  Thanks, Ben.
                  >
                  > so what is the correct way to say | is it actually bar?
                  > I have always called it pipe.... 

                  It depends on the context in which it's being used.

                  Thanks for the input guys. I was thinking of actually making a few FreeBSD
                  tutorial videos.. then show the install of vim/gvim.. and that got me thinking..
                  What do I call the darn charterers when I refer to them.. things like:

                  | ` { [ ~

                  or when you give a command with a parameter like  vim --help
                  how do you refer to the -- part... I could say minus - minus or I could say
                  tac - tac... I suppose there is no universal standards that I know of...
                  --

                  Sam Fourman Jr.

                  --
                  --
                  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
                   
                  ---
                  You received this message because you are subscribed to the Google Groups "vim_use" group.
                  To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                  For more options, visit https://groups.google.com/groups/opt_out.
                • Nikolay Pavlov
                  ... thinking.. ... say ... I have never heard about - being a tac. About universal standards: there is Unicode and it defines also human-readable names. Bar
                  Message 8 of 8 , Sep 19, 2013
                  • 0 Attachment


                    On Sep 19, 2013 5:51 PM, "Sam Fourman Jr." <sfourman@...> wrote:
                    >
                    >
                    >
                    >
                    > On Wed, Sep 18, 2013 at 6:48 PM, Gary Johnson <garyjohn@...> wrote:
                    >>
                    >> On 2013-09-18, Sam Fourman Jr. wrote:
                    >> >
                    >> > On Wed, Sep 18, 2013 at 4:47 PM, Paul wrote:
                    >> >
                    >> >     On Wednesday, September 18, 2013, Ben Fritz wrote:
                    >> >     > :he :command-bar
                    >> >
                    >> >     That certainly helped.  Thanks, Ben.
                    >> >
                    >> > so what is the correct way to say | is it actually bar?
                    >> > I have always called it pipe.... 
                    >>
                    >> It depends on the context in which it's being used.
                    >
                    >
                    > Thanks for the input guys. I was thinking of actually making a few FreeBSD
                    > tutorial videos.. then show the install of vim/gvim.. and that got me thinking..
                    > What do I call the darn charterers when I refer to them.. things like:
                    >
                    > | ` { [ ~
                    >
                    > or when you give a command with a parameter like  vim --help
                    > how do you refer to the -- part... I could say minus - minus or I could say
                    > tac - tac... I suppose there is no universal standards that I know of...

                    I have never heard about "-" being a tac.

                    About universal standards: there is Unicode and it defines also human-readable names. Bar is "VERTICAL LINE" there, "-" is "HYPHEN-MINUS" (because it contains also both hyphen and minus signs which usually look better on appropriate places). I do not think though your speech would be easy to understand if you will use Unicode names, but nevertheless it is a universal standard.

                    > --
                    >
                    > Sam Fourman Jr.
                    >
                    > --
                    > --
                    > 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
                    >  
                    > ---
                    > You received this message because you are subscribed to the Google Groups "vim_use" group.
                    > To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                    > For more options, visit https://groups.google.com/groups/opt_out.

                    --
                    --
                    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
                     
                    ---
                    You received this message because you are subscribed to the Google Groups "vim_use" group.
                    To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+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.