如何将 vim 调试器输出捕获到文件或寄存器?



我正在调试一个 vim 脚本:

:breakadd here
:redir >somefile.txt
:so %

预期输出:

Entering Debug mode.  Type "cont" to continue.
/some/path/somescript.vim
line 327: execute 'echom ' .  "'done'"
>step
/some/path/somescript.vim
line 327: echom 'done'
>step
done
/some/path/somescript.vim
line 335: End of sourced file
>finish
:redir END
:e somefile.txt

相反,我得到:

-- INSERT --
1 line less; before #1  1 second ago
1 line less; before #1  1 second ago
Already at oldest change
Breakpoint in "/some/path/somescript.vim" line 327
done

解决方法 - 现在只需使用鼠标或脚本编写复制并粘贴输出。

:Verbose messages

解决方法是使用:Verbose messages

相关内容

  • 没有找到相关文章

最新更新