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

toggle menu in gvim?

Expand Messages
  • Konovalov, Vadim
    Hi, I use following command to make menu appear: set go+=m and this one to make it disappear: set go-=m is there a way to toggle it? Using a function?? TIA,
    Message 1 of 14 , Nov 19, 2013

      Hi,

       

      I use following command to make menu appear:

      set go+=m

      and this one to make it disappear:

      set go-=m

       

      is there  a way to toggle it?

      Using a function??

       

      TIA,

      Vadim.

      --
      --
      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.
    • Christian Brabandt
      ... Best, 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
      Message 2 of 14 , Nov 19, 2013
        On Wed, November 20, 2013 06:18, Konovalov, Vadim wrote:
        > I use following command to make menu appear:
        > set go+=m
        > and this one to make it disappear:
        > set go-=m
        >
        > is there a way to toggle it?

        :com ToggleMenu if &go=~'m'|set go-=m|else|set go+=m|endif


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

        ---
        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.
      • Konovalov, Vadim
        Hi, I use following command to make menu appear: set go+=m and this one to make it disappear: set go-=m is there  a way to toggle it? Using a function?? TIA,
        Message 3 of 14 , Nov 21, 2013
          Hi,

          I use following command to make menu appear:
          set go+=m
          and this one to make it disappear:
          set go-=m

          is there  a way to toggle it?
          Using a function??

          TIA,
          Vadim.

          --
          --
          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.
        • Tim Chase
          ... nnoremap :if &go=~ m set go-=m else set go+=m endif You can then use to toggle the menu bar. -tim -- -- You received this
          Message 4 of 14 , Nov 21, 2013
            On 2013-11-21 10:24, Konovalov, Vadim wrote:
            > I use following command to make menu appear:
            > set go+=m
            > and this one to make it disappear:
            > set go-=m
            >
            > is there  a way to toggle it?
            > Using a function??

            nnoremap <f4> :if &go=~'m'<bar>set go-=m<bar>else<bar>set
            go+=m<bar>endif<cr>

            You can then use <f4> to toggle the menu bar.

            -tim


            --
            --
            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.
          • Christian Brabandt
            ... What was wrong with the answer you received the last time? Best, Christian -- -- You received this message from the vim_use maillist. Do not top-post!
            Message 5 of 14 , Nov 21, 2013
              On Thu, November 21, 2013 16:24, Konovalov, Vadim wrote:
              > Hi,
              >
              > I use following command to make menu appear:
              > set go+=m
              > and this one to make it disappear:
              > set go-=m
              >
              > is there  a way to toggle it?
              > Using a function??

              What was wrong with the answer you received the last time?

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

              ---
              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.
            • Tim Chase
              ... I thought that sounded familiar--I just didn t have the previous thread in my local cache. :-) -tim -- -- You received this message from the vim_use
              Message 6 of 14 , Nov 21, 2013
                On 2013-11-21 16:33, Christian Brabandt wrote:
                > What was wrong with the answer you received the last time?

                I thought that sounded familiar--I just didn't have the previous
                thread in my local cache. :-)

                -tim


                --
                --
                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.
              • tooth pik
                ... Vadim: Did you not see Christian s reply to this same question yesterday? ... which defines a command to perform the toggle you are desiring. If there s
                Message 7 of 14 , Nov 21, 2013
                  On Thu, Nov 21, 2013 at 10:24:16AM -0500, Konovalov, Vadim wrote:

                  > I use following command to make menu appear:
                  > set go+=m
                  > and this one to make it disappear:
                  > set go-=m

                  > is there  a way to toggle it?
                  > Using a function??

                  Vadim:

                  Did you not see Christian's reply to this same question yesterday?

                  If not, it was:

                  :com ToggleMenu if &go=~'m'|set go-=m|else|set go+=m|endif

                  which defines a command to perform the toggle you are desiring.

                  If there's something you don't understand or don't like about his reply,
                  say so and we can line it out for you.

                  --
                  _|_ _ __|_|_ ._ o|
                  |_(_)(_)|_| ||_)||<
                  |

                  --
                  --
                  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.
                • Tim Chase
                  ... Based on the (off-list) reply of thanks I received from the OP, I suspect that the only difference was that mine was a one-press mapping, while Christian s
                  Message 8 of 14 , Nov 21, 2013
                    On 2013-11-21 09:42, tooth pik wrote:
                    > If not, it was:
                    >
                    > :com ToggleMenu if &go=~'m'|set go-=m|else|set go+=m|endif
                    >
                    > which defines a command to perform the toggle you are desiring.
                    >
                    > If there's something you don't understand or don't like about his
                    > reply, say so and we can line it out for you.

                    Based on the (off-list) reply of thanks I received from the OP, I
                    suspect that the only difference was that mine was a one-press
                    mapping, while Christian's was a command. Perhaps the usage of a
                    command was unclear to a novice.

                    -tim


                    --
                    --
                    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.
                  • jmlucjav
                    hi, If i use tm instead of the menu does not toogle until I press another key after last CR, if I leave f4, it works instantly. Is that something
                    Message 9 of 14 , Nov 21, 2013
                      hi,

                      If i use <leader>tm instead of <f4> the menu does not toogle until I press another key after last CR, if I leave f4, it works instantly. Is that something I am missing or something in my vimrc causing this?


                      On Thu, Nov 21, 2013 at 4:33 PM, Tim Chase <vim@...> wrote:
                      On 2013-11-21 10:24, Konovalov, Vadim wrote:
                      > I use following command to make menu appear:
                      > set go+=m
                      > and this one to make it disappear:
                      > set go-=m
                      >
                      > is there  a way to toggle it?
                      > Using a function??

                      nnoremap <f4> :if &go=~'m'<bar>set go-=m<bar>else<bar>set
                      go+=m<bar>endif<cr>

                      You can then use <f4> to toggle the menu bar.

                      -tim


                      --
                      --
                      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.
                    • Tim Chase
                      ... That s usually indicative that you have some other mapping that starts with tm and it s waiting for you to disambiguate the command you re
                      Message 10 of 14 , Nov 21, 2013
                        On 2013-11-21 16:50, jmlucjav wrote:
                        > If i use <leader>tm instead of <f4> the menu does not toogle until
                        > I press another key after last CR, if I leave f4, it works
                        > instantly. Is that something I am missing or something in my vimrc
                        > causing this?

                        That's usually indicative that you have some other mapping that
                        starts with "<leader>tm" and it's waiting for you to disambiguate the
                        command you're issuing. Without the aforementioned mapping in your
                        vimrc file, take a look at the output of ":nnoremap" to see if you
                        already have something starting with "\tm" (or whatever your leader
                        key is).

                        -tim


                        --
                        --
                        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.
                      • jmlucjav
                        thanks tim, I tried :nnoremap and there is just one mapping starting with ,tm (, is my leader). I could not copy the output of that command, but take my word
                        Message 11 of 14 , Nov 22, 2013
                          thanks tim, I tried :nnoremap and there is just one mapping starting with ,tm (, is my leader). I could not copy the output of that command, but take my word for it.

                          Anything else anyone could think of?


                          On Thu, Nov 21, 2013 at 4:57 PM, Tim Chase <vim@...> wrote:
                          On 2013-11-21 16:50, jmlucjav wrote:
                          > If i use <leader>tm instead of <f4> the menu does not toogle until
                          > I press another key after last CR, if I leave f4, it works
                          > instantly. Is that something I am missing or something in my vimrc
                          > causing this?

                          That's usually indicative that you have some other mapping that
                          starts with "<leader>tm" and it's waiting for you to disambiguate the
                          command you're issuing.  Without the aforementioned mapping in your
                          vimrc file, take a look at the output of ":nnoremap" to see if you
                          already have something starting with "\tm" (or whatever your leader
                          key is).

                          -tim



                          --
                          --
                          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
                          ... Now you can paste the resulting command output text. -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below
                          Message 12 of 14 , Nov 22, 2013
                            On Friday, November 22, 2013 4:01:37 AM UTC-6, xavier jmlucjav wrote:
                            > thanks tim, I tried :nnoremap and there is just one mapping starting with ,tm (, is my leader). I could not copy the output of that command, but take my word for it.
                            >

                            FYI, to copy the output for pasting elsewhere, use:

                            :redir @*
                            :{your command here}
                            :redir END

                            Now you can paste the resulting command output text.

                            --
                            --
                            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.
                          • jmlucjav
                            duly noted, thanks ... -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For
                            Message 13 of 14 , Nov 22, 2013
                              duly noted, thanks


                              On Fri, Nov 22, 2013 at 5:07 PM, Ben Fritz <fritzophrenic@...> wrote:
                              On Friday, November 22, 2013 4:01:37 AM UTC-6, xavier jmlucjav wrote:
                              > thanks tim, I tried :nnoremap and there is just one mapping starting with ,tm (, is my leader). I could not copy the output of that command, but take my word for it.
                              >

                              FYI, to copy the output for pasting elsewhere, use:

                              :redir @*
                              :{your command here}
                              :redir END

                              Now you can paste the resulting command output text.

                              --
                              --
                              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.
                            • Konovalov, Vadim
                              ... The mail was lost, due to my mailer behavior that I ve configured incorrectly. Sorry for the trouble, And thank you a lot for your response, that was
                              Message 14 of 14 , Dec 4, 2013
                                > On Behalf Of Christian Brabandt
                                > On Thu, November 21, 2013 16:24, Konovalov, Vadim wrote:
                                > > is there  a way to toggle it?
                                > > Using a function??
                                >
                                > What was wrong with the answer you received the last time?

                                The mail was lost, due to my mailer behavior that I've configured incorrectly.

                                Sorry for the trouble,
                                And thank you a lot for your response, that was useful (but lost 1st time, sorry once again)

                                Regards,
                                Vadim.

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