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

69600Re: capture() function to get output of command

Expand Messages
  • ZyX
    May 13, 2013
    • 0 Attachment
      > I cannot think of a plugin that depends on having a nested :redir throw
      > an error.

      Refer to my message. Nested :redir throws an error only when context is switched, it is possible to have

      redir => commands
      redir => mappings
      redir => imappings
      " and so on
      redir END

      > That's just bad coding practice, and it could easily be
      > corrected in the plugin.

      I completely agree there. Also refer to my message, I explained there how this situation may easily be worked around (just making it always write to target when any :redir is issued is enough for plugins to work; finishing redirections to local variables after function finishes will delete stale redirs in all cases that make sense to write from my point of view and even not finishing should be rare enough and not result in much harm: at maximum vim killed by OOM killer or a few MiBs long file). I have never actually seen plugins with the above code though.

      > Do you have an actual example? As I've shown,
      > contrarily there are plugins that (when working together) are indeed
      > broken due to what I would call an implementation deficiency.

      You received this message from the "vim_dev" 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_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 26 messages in this topic