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

Updating Syntax menu

Expand Messages
  • russurquhart1@...
    Hi, I ve been adding new syntax files, and putting them in the correct location, but i don t know if i am supposed to manually update the synmenu.vim file, or
    Message 1 of 10 , Jan 24, 2013
    • 0 Attachment
      Hi,

      I've been adding new syntax files, and putting them in the correct location, but i don't know if i am supposed to manually update the synmenu.vim file, or does some other process do that, so that my new syntax files show up in the menu.

      Any help is greatly appreciated!

      thanks,

      Russ

      --
      --
      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
    • Tony Mechelynck
      ... IIUC, Syntax → Show filetypes in menu doesn t add menuitems with the name of *syntax* plugins but of *filetype* plugins. If your new syntax scripts
      Message 2 of 10 , Jan 24, 2013
      • 0 Attachment
        On 24/01/13 17:07, russurquhart1@... wrote:
        >
        > Hi,
        >
        > I've been adding new syntax files, and putting them in the correct location, but i don't know if i am supposed to manually update the synmenu.vim file, or does some other process do that, so that my new syntax files show up in the menu.
        >
        > Any help is greatly appreciated!
        >
        > thanks,
        >
        > Russ
        >

        IIUC, "Syntax → Show filetypes in menu" doesn't add menuitems with the
        name of *syntax* plugins but of *filetype* plugins. If your new syntax
        scripts don't appear, try adding zero-length files of the same names
        (not overwriting existing scripts, of course) in ~/.vim/ftplugin/ (for
        Unix-like) or in ~/vimfiles/ftplugin/ (for Windows).

        You may have to restart Vim (I'm not sure) to have the new filetypes
        inserted in the Syntax menu.

        If *that* doesn't work, then don't modify $VIMRUNTIME/synmenu.vim (in
        general, NEVER modify ANYTHING in the $VIMRUNTIME directory tree,
        because any Vim update may silently remove your changes); rather, add
        additional synmenu.vim files in ~/.vim/ (for Unix-like) or in ~/vimfiles
        (for Windows). IIUC they will be sourced in addition to the default
        scripts, because Vim installs them by doing ":runtime! synmenu.vim" (see
        ":help :runtime").


        Best regards,
        Tony.
        --
        You can be stopped by the police for biking over 65 miles per hour.
        You are not allowed to walk across a street on your hands.
        [real standing laws in Connecticut, United States of America]

        --
        --
        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
      • russurquhart1@...
        In this case, i had a syntax file and a ftdetect file. (For multimarkdown.) I put the syntax and ftdetect files in the correct location. the file type is
        Message 3 of 10 , Jan 24, 2013
        • 0 Attachment
          In this case, i had a syntax file and a ftdetect file. (For multimarkdown.) I put the syntax and ftdetect files in the correct location. the file type is found, but the syntax menu does not update.





          On 01/24/13, Tony Mechelynck<antoine.mechelynck@...> wrote:

          On 24/01/13 17:07, russurquhart1@... wrote:
          >
          > Hi,
          >
          > I've been adding new syntax files, and putting them in the correct location, but i don't know if i am supposed to manually update the synmenu.vim file, or does some other process do that, so that my new syntax files show up in the menu.
          >
          > Any help is greatly appreciated!
          >
          > thanks,
          >
          > Russ
          >

          IIUC, "Syntax → Show filetypes in menu" doesn't add menuitems with the
          name of *syntax* plugins but of *filetype* plugins. If your new syntax
          scripts don't appear, try adding zero-length files of the same names
          (not overwriting existing scripts, of course) in ~/.vim/ftplugin/ (for
          Unix-like) or in ~/vimfiles/ftplugin/ (for Windows).

          You may have to restart Vim (I'm not sure) to have the new filetypes
          inserted in the Syntax menu.

          If *that* doesn't work, then don't modify $VIMRUNTIME/synmenu.vim (in
          general, NEVER modify ANYTHING in the $VIMRUNTIME directory tree,
          because any Vim update may silently remove your changes); rather, add
          additional synmenu.vim files in ~/.vim/ (for Unix-like) or in ~/vimfiles
          (for Windows). IIUC they will be sourced in addition to the default
          scripts, because Vim installs them by doing ":runtime! synmenu.vim" (see
          ":help :runtime").


          Best regards,
          Tony.
          --
          You can be stopped by the police for biking over 65 miles per hour.
          You are not allowed to walk across a street on your hands.
          [real standing laws in Connecticut, United States of America]

          --
          --
          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 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
        • Ben Fritz
          ... Tony suggested that you try creating at ftplugin file, not an ftdetect file. Still, looking at the synmenu.vim file, it doesn t look like that would have
          Message 4 of 10 , Jan 24, 2013
          • 0 Attachment
            On Thursday, January 24, 2013 2:07:01 PM UTC-6, russur wrote:
            > In this case, i had a syntax file and a ftdetect file. (For multimarkdown.) I put the syntax and ftdetect files in the correct location. the file type is found, but the syntax menu does not update.
            >

            Tony suggested that you try creating at ftplugin file, not an ftdetect file. Still, looking at the synmenu.vim file, it doesn't look like that would have made any difference either. I think you will need to copy and then modify the file as Tony suggest. I see another file called makemenu.vim which apparently generates synmenu.vim, perhaps you can modify and use that instead of direct modification. You'll still want to work on a local copy instead of the distribution copy.

            --
            --
            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
          • russurquhart1@...
            Tony had also suggested creating an empty ftplugin file. I did that, put it in ftplugin, restarted vim, but the syntax menu didn t get updated. I m thinking
            Message 5 of 10 , Jan 24, 2013
            • 0 Attachment
              Tony had also suggested creating an empty ftplugin file. I did that, put it in ftplugin, restarted vim, but the syntax menu didn't get updated.

              I'm thinking something manual has to be done, because i have other syntax files, that work, and have their files in the right place but the syntax menu does not show these either.

              Thanks everyone for their help,

              Russ





              On 01/24/13, Ben Fritz<fritzophrenic@...> wrote:

              On Thursday, January 24, 2013 2:07:01 PM UTC-6, russur wrote:
              > In this case, i had a syntax file and a ftdetect file. (For multimarkdown.) I put the syntax and ftdetect files in the correct location. the file type is found, but the syntax menu does not update.
              >

              Tony suggested that you try creating at ftplugin file, not an ftdetect file. Still, looking at the synmenu.vim file, it doesn't look like that would have made any difference either. I think you will need to copy and then modify the file as Tony suggest. I see another file called makemenu.vim which apparently generates synmenu.vim, perhaps you can modify and use that instead of direct modification. You'll still want to work on a local copy instead of the distribution copy.

              --
              --
              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 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
            • russurquhart1@...
              I want to thank everyone for their help. I think i found the answer. According to this url: http://www.lesismore.co.za/viminform7.html The relative portion:
              Message 6 of 10 , Jan 25, 2013
              • 0 Attachment
                I want to thank everyone for their help. I think i found the answer.

                According to this url:

                http://www.lesismore.co.za/viminform7.html

                The relative portion:

                Last, you can add the Vim syntax to the Syntax menu. Open Vim and enter :ed $VIMRUNTIME/makemenu.vim. Add the line below just after the older "Inform" entry. You need to source the file (ie. run it) to update the menus: :source $VIMRUNTIME/makemenu.vim.

                SynMenu HIJK.Inform7:inform7


                I entered SynMenu MeNO.MMD:mmd

                sourced makemenu.vim and that worked!

                Thanks,

                Russ






                So you've wrung your eyes of all your tears
                And you caught them in a glass
                To save them for some day next year, when you're waxing over your past
                And should you ever begin to believe
                That the good times was worth all the waste
                Find your glass of last year's tears and you take a taste

                On 01/24/13, Tony Mechelynck<antoine.mechelynck@...> wrote:

                On 24/01/13 17:07, russurquhart1@... wrote:
                >
                > Hi,
                >
                > I've been adding new syntax files, and putting them in the correct location, but i don't know if i am supposed to manually update the synmenu.vim file, or does some other process do that, so that my new syntax files show up in the menu.
                >
                > Any help is greatly appreciated!
                >
                > thanks,
                >
                > Russ
                >

                IIUC, "Syntax → Show filetypes in menu" doesn't add menuitems with the
                name of *syntax* plugins but of *filetype* plugins. If your new syntax
                scripts don't appear, try adding zero-length files of the same names
                (not overwriting existing scripts, of course) in ~/.vim/ftplugin/ (for
                Unix-like) or in ~/vimfiles/ftplugin/ (for Windows).

                You may have to restart Vim (I'm not sure) to have the new filetypes
                inserted in the Syntax menu.

                If *that* doesn't work, then don't modify $VIMRUNTIME/synmenu.vim (in
                general, NEVER modify ANYTHING in the $VIMRUNTIME directory tree,
                because any Vim update may silently remove your changes); rather, add
                additional synmenu.vim files in ~/.vim/ (for Unix-like) or in ~/vimfiles
                (for Windows). IIUC they will be sourced in addition to the default
                scripts, because Vim installs them by doing ":runtime! synmenu.vim" (see
                ":help :runtime").


                Best regards,
                Tony.
                --
                You can be stopped by the police for biking over 65 miles per hour.
                You are not allowed to walk across a street on your hands.
                [real standing laws in Connecticut, United States of America]

                --
                --
                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 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
              • Tony Mechelynck
                ... As has repeatedly been said on this list, you should NEVER change anything in the $VIMRUNTIME tree because any update can do away with your changes,
                Message 7 of 10 , Jan 25, 2013
                • 0 Attachment
                  On 25/01/13 22:36, russurquhart1@... wrote:
                  > I want to thank everyone for their help. I think i found the answer.
                  >
                  > According to this url:
                  >
                  > http://www.lesismore.co.za/viminform7.html
                  >
                  > The relative portion:
                  >
                  > Last, you can add the Vim syntax to the Syntax menu. Open Vim and enter :ed $VIMRUNTIME/makemenu.vim. Add the line below just after the older "Inform" entry. You need to source the file (ie. run it) to update the menus: :source $VIMRUNTIME/makemenu.vim.
                  >
                  > SynMenu HIJK.Inform7:inform7
                  >
                  >
                  > I entered SynMenu MeNO.MMD:mmd
                  >
                  > sourced makemenu.vim and that worked!
                  >
                  > Thanks,
                  >
                  > Russ


                  As has repeatedly been said on this list, you should NEVER change
                  anything in the $VIMRUNTIME tree because any update can do away with
                  your changes, without telling you that it did. You should rather save
                  the modified version of makemenu.vim as $VIM/vimfiles/makemenu.vim
                  (system-wide on any platform) or ~/.vim/makemenu.vim (single-user on
                  Unix-like systems) or ~/vimfiles/makemenu.vim (single-user on Windows).


                  Best regards,
                  猥ony.
                  --
                  Why don't elephants eat penguins ?

                  Because they can't get the wrappers off ...


                  --
                  --
                  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
                • Russell Urquhart
                  ... Hi Tony, Yes you are correct, i will update my user makemenu.vim accordingly. I, while i was doing this, was thinking the same thing, what do i do, if/when
                  Message 8 of 10 , Jan 26, 2013
                  • 0 Attachment
                    On Sat, Jan 26, 2013 at 06:21:45AM +0100, Tony Mechelynck wrote:
                    >
                    > As has repeatedly been said on this list, you should NEVER change
                    > anything in the $VIMRUNTIME tree because any update can do away with
                    > your changes, without telling you that it did. You should rather save
                    > the modified version of makemenu.vim as $VIM/vimfiles/makemenu.vim
                    > (system-wide on any platform) or ~/.vim/makemenu.vim (single-user on
                    > Unix-like systems) or ~/vimfiles/makemenu.vim (single-user on Windows).
                    >
                    >
                    > Best regards,
                    > 猥ony.
                    > --
                    > Why don't elephants eat penguins ?
                    >
                    > Because they can't get the wrappers off ...
                    Hi Tony,

                    Yes you are correct, i will update my user makemenu.vim accordingly. I, while i was doing this, was thinking the same thing, what do i do, if/when i update my vim. And this will work, right, because i will source THIS makemenu.vim, rather than the system wide one, right?

                    Thanks for steering me in the right direction!

                    Russ

                    --
                    --
                    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
                  • Tony Mechelynck
                    ... Hm, after some more searching, I could find no makemenu.vim at any depth under $VIMRUNTIME in the Vim distribution. Where I see it is in the source, at
                    Message 9 of 10 , Jan 26, 2013
                    • 0 Attachment
                      On 26/01/13 15:34, Russell Urquhart wrote:
                      > On Sat, Jan 26, 2013 at 06:21:45AM +0100, Tony Mechelynck wrote:
                      >>
                      >> As has repeatedly been said on this list, you should NEVER change
                      >> anything in the $VIMRUNTIME tree because any update can do away with
                      >> your changes, without telling you that it did. You should rather save
                      >> the modified version of makemenu.vim as $VIM/vimfiles/makemenu.vim
                      >> (system-wide on any platform) or ~/.vim/makemenu.vim (single-user on
                      >> Unix-like systems) or ~/vimfiles/makemenu.vim (single-user on Windows).
                      >>
                      >>
                      >> Best regards,
                      >> 猥ony.
                      >> --
                      >> Why don't elephants eat penguins ?
                      >>
                      >> Because they can't get the wrappers off ...
                      > Hi Tony,
                      >
                      > Yes you are correct, i will update my user makemenu.vim accordingly. I, while i was doing this, was thinking the same thing, what do i do, if/when i update my vim. And this will work, right, because i will source THIS makemenu.vim, rather than the system wide one, right?
                      >
                      > Thanks for steering me in the right direction!
                      >
                      > Russ
                      >
                      Hm, after some more searching, I could find no "makemenu.vim" at any
                      depth under $VIMRUNTIME in the Vim distribution. Where I see it is in
                      the source, at ./runtime/makemenu.vim, and it says it is used by "make
                      menu" in the src directory, which implies a compile-time rather than
                      run-time use.

                      I suppose you might create an unnamed branch in your hg clone, with your
                      modified runtime/makemenu.vim, and then use

                      cd src
                      # source any script to set config settings
                      make menu

                      to generate the menu.

                      See also
                      hg help branch
                      http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
                      http://users.skynet.be/antoine.mechelynck/vim/compunix.htm

                      The above assumes a Unix-like OS. I'm not sure which differences (if
                      any) would be required to generate the menus on Windows. It may or may
                      not depend on which compiler you use to compile Vim.


                      Best regards,
                      Tony.
                      --
                      "Even if you're on the right track, you'll get run over if you just sit
                      there."
                      -- Will Rogers

                      --
                      --
                      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
                    • Russell Urquhart
                      So, would this imply that the Syntax menu should only be updated when a new version is compiled? I hink i m going to keep a copy of the files i updated,
                      Message 10 of 10 , Jan 31, 2013
                      • 0 Attachment
                        So, would this imply that the Syntax menu should only be updated when a new version is compiled?

                        I hink i'm going to keep a copy of the files i updated, probably putting them in the directory that does not get changed, along with a README, for myself, to remind me how to update this file.

                        Thanks,

                        Russ

                        > Hm, after some more searching, I could find no "makemenu.vim" at any
                        > depth under $VIMRUNTIME in the Vim distribution. Where I see it is in
                        > the source, at ./runtime/makemenu.vim, and it says it is used by "make
                        > menu" in the src directory, which implies a compile-time rather than
                        > run-time use.
                        >
                        > I suppose you might create an unnamed branch in your hg clone, with your
                        > modified runtime/makemenu.vim, and then use
                        >
                        > cd src
                        > # source any script to set config settings
                        > make menu
                        >
                        > to generate the menu.
                        >
                        > See also
                        > hg help branch
                        > http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
                        > http://users.skynet.be/antoine.mechelynck/vim/compunix.htm
                        >
                        > The above assumes a Unix-like OS. I'm not sure which differences (if
                        > any) would be required to generate the menus on Windows. It may or may
                        > not depend on which compiler you use to compile Vim.
                        >
                        >
                        > Best regards,
                        > Tony.
                        > --
                        > "Even if you're on the right track, you'll get run over if you just sit
                        > there."
                        > -- Will Rogers
                        >
                        > --
                        > --
                        > 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 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.