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

Re: Something to wrap a selection

Expand Messages
  • Harry Putnam
    ... Oh boy, yup this baby works now. Man, you went so far beyond the call of duty, and let me tell you that it was really appreciated here. There are so many
    Message 1 of 10 , Sep 28, 2013
    • 0 Attachment
      Paul Isambert <zappathustra@...> writes:

      > I say goodbye here, the code follows. I’ll hope you’ll be satisfied
      > this time (there might be glitches, I did not test the command much,
      > just basic tries).

      Oh boy, yup this baby works now.

      Man, you went so far beyond the call of duty, and let me tell you that
      it was really appreciated here.

      There are so many examples and techniques in that code I will be
      learning from it for a good while.

      Oh, and I promise not to post one more thing to this thread.. : )

      --
      --
      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.
    • Paul Isambert
      ... If duty there was, it was only not to give you half-baked code. Plus writing scriptlets is so funnier than dish-washing. ... But you should if the code
      Message 2 of 10 , Sep 29, 2013
      • 0 Attachment
        Harry Putnam <reader@...> a écrit:
        > Paul Isambert <zappathustra@...> writes:
        >
        > > I say goodbye here, the code follows. I’ll hope you’ll be satisfied
        > > this time (there might be glitches, I did not test the command much,
        > > just basic tries).
        >
        > Oh boy, yup this baby works now.
        >
        > Man, you went so far beyond the call of duty, and let me tell you that
        > it was really appreciated here.

        If duty there was, it was only not to give you half-baked code. Plus
        writing scriptlets is so funnier than dish-washing.

        > There are so many examples and techniques in that code I will be
        > learning from it for a good while.
        >
        > Oh, and I promise not to post one more thing to this thread.. : )

        But you should if the code goes wrong. By the way there was a small
        mistake. In:

        let s:commentfile = expand("<sfile>:p:h") . "/.markchangerc"
        if filereadable(s:commentfile)
        let s:data = readfile(s:commentfile)
        for line in s:data
        if line !~ '^#' && line =~ '='
        let s:matches = matchlist(line, '\([^=[:blank:]]\+\)\s*=\s*\(\S\+\)')
        if len(s:matches)
        let s:markchangecomments[s:matches[1]] = s:matches[2]
        endif
        endif
        endfor
        endif

        you should replace all occurrences of “line” with “s:line”, otherwise
        it defines a global variable whereas you want it to be only visible in
        the script (I’m used to loop variables being local, à la Lua).

        Best,
        Paul

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