Friday, August 3, 2012

Re: vim: current best recommended script/function debug method/tool/plugins?

On Friday, August 3, 2012 2:42:19 AM UTC-5, Nicolas Dermine wrote:
> On 3 Aug 2012 07:03, "ping" <songpingemail@gmail.com> wrote:
>
> >
>
> > folks:
>
> > I'm a newbie to vimL/vim script.
>
> > I'm trying to define my own functions and keep getting errors.
>
> > Especially I hope there is a way to quickly get the value of my var -- a way better than insert "echo var1|sleep 3" for every var that I want to inspect.
>
> > (I use it a lot, and I need that sleep to make sure I can see the output from the screen)
>
> >
>
> > google search mentioned Decho from some thread, but it looks last update is from 4 years ago. I'd like to hear advice from experts before diving into it.
>
> >
>
> > thanks
>
> >
>
> > regards
>
> > ping
>
> Hi ping,
>
> I am no expert, but I started reading "learn vimscript the hard way" by Steve Losh, and one of the first things he mentions is "echom".
>
> After your function has executed you can still see the messages with the :messages command.
>
> Nico

:echom is a good technique, but Vim also has a built-in debugger.

See :help debug-mode

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

No comments: