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

Re: Re: debug vimscript with echomsg

Expand Messages
  • Ag. D. Hatzimanikas
    ... if &buftype != nofile ... --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_use maillist. For more
    Message 1 of 7 , Jul 31, 2008
      On Πεμ, Ιούλ 31, at 11:57 Anton Sharonov wrote:
      >
      > Thanks, Ben - it works. Only the mod which I made
      >
      > "new
      > normal! ggdG
      >
      > To reuse same buffer. It has however a potential to destroy the
      > data. Hmmm, how can I check, either
      >
      > setlocal buftype=nofile
      >
      > were already executed once for current buffer ? I have tryed
      > something like
      >
      > if buftype!=nofile
      if &buftype != 'nofile'

      > new
      > else
      > normal! ggdG
      > endif
      >
      > But it doesn't works. Then I can conditionally create "scratch"
      > buffer, only if current buffer isn't "scratch" already.
      >

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Charles E Campbell Jr
      ... Have you seen the Decho plugin yet? You can get the Decho plugin from: http://vim.sourceforge.net/scripts/script.php?script_id=120 -or-
      Message 2 of 7 , Jul 31, 2008
        Anton Sharonov wrote:
        > During debugging, I often use :echomsg command. And it is pain to
        > (re)check the output of it using :messages - especially if the
        > output will be longer. Is there are some possibilities to have it
        > side-by-side : messages output in some kind of persistently
        > present buffer ?
        >
        > Or can it only be done with some scripting - easiest what I can
        > imagine is a macro bound to, let say F5, which put the latest
        > result of :messages to one specially created buffer and scrolls
        > it to the bottom ?
        >
        Have you seen the Decho plugin yet?

        You can get the Decho plugin from:

        http://vim.sourceforge.net/scripts/script.php?script_id=120
        -or-
        http://mysite.verizon.net/astronaut/vim/index.html#DECHO
        (this latter one is always the most up-to-date)


        Examples:
        call Dfunc("SomeFunction(arg=".a:arg.")")
        call Decho("Some message here")
        call Dret("SomeFunction")

        Decho messages can be directed to go to several places:
        DechoMsgOn -- subsequent Decho messages use echomsg
        DechoRemOn -- subsequent Decho messages go to a remote vim
        DechoTabOn -- subsequent Decho messages go to a separate buffer in a
        separate tab
        DechoVarOn -- subsequent Decho messages go to a variable
        default -- subsequent Decho messages go to a separate
        buffer in a separate window (same tab)

        Regards,
        Chip Campbell


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Anton Sharonov
        Thanks, Charles - I will give a try to this plugin next time I debug something in vimscript :) ... --~--~---------~--~----~------------~-------~--~----~ You
        Message 3 of 7 , Jul 31, 2008
          Thanks, Charles - I will give a try to this plugin next time I
          debug something in vimscript :)

          2008/7/31 Charles E Campbell Jr <drchip@...>:
          >
          > Anton Sharonov wrote:
          >> During debugging, I often use :echomsg command. And it is pain to
          >> (re)check the output of it using :messages - especially if the
          >> output will be longer. Is there are some possibilities to have it
          >> side-by-side : messages output in some kind of persistently
          >> present buffer ?
          >>
          >> Or can it only be done with some scripting - easiest what I can
          >> imagine is a macro bound to, let say F5, which put the latest
          >> result of :messages to one specially created buffer and scrolls
          >> it to the bottom ?
          >>
          > Have you seen the Decho plugin yet?
          >
          > You can get the Decho plugin from:
          >
          > http://vim.sourceforge.net/scripts/script.php?script_id=120
          > -or-
          > http://mysite.verizon.net/astronaut/vim/index.html#DECHO
          > (this latter one is always the most up-to-date)
          >
          >
          > Examples:
          > call Dfunc("SomeFunction(arg=".a:arg.")")
          > call Decho("Some message here")
          > call Dret("SomeFunction")
          >
          > Decho messages can be directed to go to several places:
          > DechoMsgOn -- subsequent Decho messages use echomsg
          > DechoRemOn -- subsequent Decho messages go to a remote vim
          > DechoTabOn -- subsequent Decho messages go to a separate buffer in a
          > separate tab
          > DechoVarOn -- subsequent Decho messages go to a variable
          > default -- subsequent Decho messages go to a separate
          > buffer in a separate window (same tab)
          >
          > Regards,
          > Chip Campbell
          >
          >
          > >
          >

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