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

Re: from lines to dict keys

Expand Messages
  • Marc Chantreux
    hello Hari ... I want my code to be readable then short. it seems that viml isn t the good langage for it. I stick on the for-loop :) regards, marc
    Message 1 of 14 , Nov 11, 2009
    • 0 Attachment
      hello Hari


      On Tue, Nov 10, 2009 at 10:11:46PM -0800, Hari Krishna Dara wrote:
      > Since you seem to want a one liner, here is one:
      >
      > let t=eval('{'.join(map(split(system("echo foo; echo bar"), "\n" ),
      > '"''".v:val."'': 1"'), ',').'}')

      I want my code to be readable then short. it seems that viml isn't the
      good langage for it. I stick on the for-loop :)

      regards,
      marc

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.