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

Problem adding keys to dictionary

Expand Messages
  • Pablo Giménez
    Hello. I am trying to customize my VAM (Vim Addon Manager) setup adding some new sources. So following docs instructions I created a function that fist queries
    Message 1 of 5 , Sep 26, 2013
      Hello.
      I am trying to customize my VAM (Vim Addon Manager) setup adding some new sources.
      So following docs instructions I created a function that fist queries a dictionary with all bundles entries and then add new keys to that dictionary, So I got two lines like:
      let d.gundo = { 'type' : 'git', 'url' : 'git://github.com/sjl/gundo.vim',
          \'homepage' : 'https://github.com/sjl/gundo.vim' }
      let d.vim-neatstatus = { 'type' : 'git', 'url' : 'git://github.com/maciakl/vim-neatstatus', 'homepage' : 'https://github.com/maciakl/vim-neatstatus' }

      The when I start vim I got errors from VAM because it cant not find these source and teh reason is because I got errors in those let lines:
      line    6:
      E18: Unexpected characters in :let
      line    8:
      E18: Unexpected characters in :let

      I cant see anything wrong with these dictionaries assignments so I don't know why vim is erroring there.
      Any ideas?
      Thanks
      --
      Un saludo
      Best Regards
      Pablo Giménez

      --
      --
      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
      ... sources. ... dictionary with all bundles entries and then add new keys to that ... github.com/maciakl/vim-neatstatus , homepage :
      Message 2 of 5 , Sep 26, 2013


        On Sep 26, 2013 3:49 PM, "Pablo Giménez" <pablogipi@...> wrote:
        >
        > Hello.
        > I am trying to customize my VAM (Vim Addon Manager) setup adding some new sources.
        > So following docs instructions I created a function that fist queries a dictionary with all bundles entries and then add new keys to that dictionary, So I got two lines like:
        > let d.gundo = { 'type' : 'git', 'url' : 'git://github.com/sjl/gundo.vim',
        >     \'homepage' : 'https://github.com/sjl/gundo.vim' }
        > let d.vim-neatstatus = { 'type' : 'git', 'url' : 'git://github.com/maciakl/vim-neatstatus', 'homepage' : 'https://github.com/maciakl/vim-neatstatus' }

        HYPHENMINUS (anything other then Latin letters, digits and underscores) cannot be used with dict.key syntax. Use brackets.

        > The when I start vim I got errors from VAM because it cant not find these source and teh reason is because I got errors in those let lines:
        > line    6:
        > E18: Unexpected characters in :let
        > line    8:
        > E18: Unexpected characters in :let
        >
        > I cant see anything wrong with these dictionaries assignments so I don't know why vim is erroring there.
        > Any ideas?
        > Thanks
        > --
        > Un saludo
        > Best Regards
        > Pablo Giménez
        >
        > --
        > --
        > 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.
      • Pablo Giménez
        2013/9/26 Nikolay Pavlov ... Ok so this will cause a key like vim-neatstatus to fail But why d.gundo is faillling? How I have to use the
        Message 3 of 5 , Sep 26, 2013



          2013/9/26 Nikolay Pavlov <zyx.vim@...>


          On Sep 26, 2013 3:49 PM, "Pablo Giménez" <pablogipi@...> wrote:
          >
          > Hello.
          > I am trying to customize my VAM (Vim Addon Manager) setup adding some new sources.
          > So following docs instructions I created a function that fist queries a dictionary with all bundles entries and then add new keys to that dictionary, So I got two lines like:
          > let d.gundo = { 'type' : 'git', 'url' : 'git://github.com/sjl/gundo.vim',
          >     \'homepage' : 'https://github.com/sjl/gundo.vim' }
          > let d.vim-neatstatus = { 'type' : 'git', 'url' : 'git://github.com/maciakl/vim-neatstatus', 'homepage' : 'https://github.com/maciakl/vim-neatstatus' }

          HYPHENMINUS (anything other then Latin letters, digits and underscores) cannot be used with dict.key syntax. Use brackets.

          Ok so this will cause a key like vim-neatstatus to fail
          But why d.gundo is faillling?
          How I have to use the parenthesis to maek these keys working?
          Thanks

          > The when I start vim I got errors from VAM because it cant not find these source and teh reason is because I got errors in those let lines:
          > line    6:
          > E18: Unexpected characters in :let
          > line    8:
          > E18: Unexpected characters in :let
          >
          > I cant see anything wrong with these dictionaries assignments so I don't know why vim is erroring there.
          > Any ideas?
          > Thanks
          > --
          > Un saludo
          > Best Regards
          > Pablo Giménez
          >
          > --
          > --
          > 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.



          --
          Un saludo
          Best Regards
          Pablo Giménez

          --
          --
          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
          ... new sources. ... a dictionary with all bundles entries and then add new keys to that ... , ... github.com/maciakl/vim-neatstatus , homepage :
          Message 4 of 5 , Sep 26, 2013


            On Sep 26, 2013 5:31 PM, "Pablo Giménez" <pablogipi@...> wrote:
            >
            >
            >
            >
            > 2013/9/26 Nikolay Pavlov <zyx.vim@...>
            >>
            >>
            >> On Sep 26, 2013 3:49 PM, "Pablo Giménez" <pablogipi@...> wrote:
            >> >
            >> > Hello.
            >> > I am trying to customize my VAM (Vim Addon Manager) setup adding some new sources.
            >> > So following docs instructions I created a function that fist queries a dictionary with all bundles entries and then add new keys to that dictionary, So I got two lines like:
            >> > let d.gundo = { 'type' : 'git', 'url' : 'git://github.com/sjl/gundo.vim',
            >> >     \'homepage' : 'https://github.com/sjl/gundo.vim' }
            >> > let d.vim-neatstatus = { 'type' : 'git', 'url' : 'git://github.com/maciakl/vim-neatstatus', 'homepage' : 'https://github.com/maciakl/vim-neatstatus' }
            >>
            >> HYPHENMINUS (anything other then Latin letters, digits and underscores) cannot be used with dict.key syntax. Use brackets.
            >
            > Ok so this will cause a key like vim-neatstatus to fail
            > But why d.gundo is faillling?

            It looks like d is not a dictionary. Note that what you posted is not enough to reproduce your problems. If d is not defined :let d.gundo will complain about missing variable, not about unexpected characters. It is to be considered undefined because you have not posted its definition.

            > How I have to use the parenthesis to maek these keys working?

            Check out :h Dictionary. It contains enough examples.

            > Thanks
            >>
            >> > The when I start vim I got errors from VAM because it cant not find these source and teh reason is because I got errors in those let lines:
            >> > line    6:
            >> > E18: Unexpected characters in :let
            >> > line    8:
            >> > E18: Unexpected characters in :let
            >> >
            >> > I cant see anything wrong with these dictionaries assignments so I don't know why vim is erroring there.
            >> > Any ideas?
            >> > Thanks
            >> > --
            >> > Un saludo
            >> > Best Regards
            >> > Pablo Giménez
            >> >
            >> > --
            >> > --
            >> > 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.
            >
            >
            >
            >
            > --
            > Un saludo
            > Best Regards
            > Pablo Giménez
            >
            > --
            > --
            > 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.
          • Pablo Giménez
            2013/9/26 Nikolay Pavlov ... Thanks Nikolai. I am trying to follow the steps from VAM docs:
            Message 5 of 5 , Sep 26, 2013



              2013/9/26 Nikolay Pavlov <zyx.vim@...>


              On Sep 26, 2013 5:31 PM, "Pablo Giménez" <pablogipi@...> wrote:
              >
              >
              >
              >
              > 2013/9/26 Nikolay Pavlov <zyx.vim@...>
              >>
              >>
              >> On Sep 26, 2013 3:49 PM, "Pablo Giménez" <pablogipi@...> wrote:
              >> >
              >> > Hello.
              >> > I am trying to customize my VAM (Vim Addon Manager) setup adding some new sources.
              >> > So following docs instructions I created a function that fist queries a dictionary with all bundles entries and then add new keys to that dictionary, So I got two lines like:
              >> > let d.gundo = { 'type' : 'git', 'url' : 'git://github.com/sjl/gundo.vim',
              >> >     \'homepage' : 'https://github.com/sjl/gundo.vim' }
              >> > let d.vim-neatstatus = { 'type' : 'git', 'url' : 'git://github.com/maciakl/vim-neatstatus', 'homepage' : 'https://github.com/maciakl/vim-neatstatus' }
              >>
              >> HYPHENMINUS (anything other then Latin letters, digits and underscores) cannot be used with dict.key syntax. Use brackets.
              >
              > Ok so this will cause a key like vim-neatstatus to fail
              > But why d.gundo is faillling?

              It looks like d is not a dictionary. Note that what you posted is not enough to reproduce your problems. If d is not defined :let d.gundo will complain about missing variable, not about unexpected characters. It is to be considered undefined because you have not posted its definition.

              Look at the  *VAM-kr-patching* section.
              It is supposed that there is function called vam#install#Pool() that returns a dictionary, but probably is not doing the right thing.
              I'll keep digging, thanks.

              > How I have to use the parenthesis to maek these keys working?

              Check out :h Dictionary. It contains enough examples.

              > Thanks
              >>
              >> > The when I start vim I got errors from VAM because it cant not find these source and teh reason is because I got errors in those let lines:
              >> > line    6:
              >> > E18: Unexpected characters in :let
              >> > line    8:
              >> > E18: Unexpected characters in :let
              >> >
              >> > I cant see anything wrong with these dictionaries assignments so I don't know why vim is erroring there.
              >> > Any ideas?
              >> > Thanks
              >> > --
              >> > Un saludo
              >> > Best Regards
              >> > Pablo Giménez
              >> >
              >> > --
              >> > --
              >> > 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.
              >
              >
              >
              >
              > --
              > Un saludo
              > Best Regards
              > Pablo Giménez
              >
              > --
              > --
              > 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.



              --
              Un saludo
              Best Regards
              Pablo Giménez

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