是否有“vim 运行时日志"? [英] Is there a "vim runtime log"?

查看:31
本文介绍了是否有“vim 运行时日志"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时我会在 vimrc 中尝试自定义/命令.一切看起来都是正确的,但就是行不通.

Sometimes I try a customization/command in my vimrc. Everything seens to be correct, but it just doesn't work.

很难知道 vim 启动时发生了什么,也很难知道哪个命令失败了,所以很难调试导致我的 vimrc 出现问题的原因.这是一种试错法,非常耗时,而且确实是一种 PITA.例如,我遇到了问题 在某些文件中带有 snipmate 插件,只是不知道如何发现问题.

It's difficult to know what's happening when vim starts, and know which command failed or not, so it's really difficult to debug what can be causing a problem in my vimrc. It's a trial-error approach, which is time consuming and really a PITA. For example, I'm having problems with snipmate plugin in some files and just don't have a clue on how to discover the problem.

vim 启动时是否有运行时日志",告诉它执行了哪些命令,哪些失败了等等?这对我很有帮助.

Is there a "runtime log" when vim starts, telling which commands it executed, which ones failed and such? This would help me a lot.

推荐答案

使用 -V[N] 选项运行 vim 会产生相当大的运行时日志,这里 N 是调试级别.

running vim with the -V[N] option will do a pretty hefty runtime log, here N is the debug level.

vim -V9myVim.log

将在当前目录中创建一个调试级别为 9 的日志,文件名为 myVim.log

would create a log of debug level 9 in the current directory with the filename myVim.log

这篇关于是否有“vim 运行时日志"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆