跳至下一个错误/代码以红色突出显示 [英] Jump to next error / code highlighted in red

查看:114
本文介绍了跳至下一个错误/代码以红色突出显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在处理合并冲突时,DCVS插入的>>>>>>======在语法上通常对于我所在的文件不正确,并以红色突出显示.处理合并冲突时,使命令跳转到这些错误将很有用.当我键入:cnext时,我仅收到消息"No Errors".这些是Mercurial合并冲突,因此我不能使用逃亡者",但我通常还是更喜欢手动编辑合并冲突.

When dealing with merge conflicts it is common that the >>>>>> and ====== inserted by DCVS are syntactically incorrect for the file I'm in and show up as highlighted in red. When dealing with merge conflicts it would be useful to have commands to jump to these error. When I type :cnext I just get the message "No Errors". These are Mercurial merge conflicts so I can't use Fugitive, but I generally prefer editing merge conflicts by hand anyway.

有没有办法跳到文件中的下一个语法错误?我认为这些错误是由语法突出显示文件决定的.

Is there a way to jump to the next syntax error in the file? I think these errors are dictated by the syntax highlighting file.

推荐答案

您可以使用:lopen打开包含错误/警告行的窗口.之后,导航到每个.

You can use :lopen to open window containing error/warning lines. After that, navigate to each of them.

实际答案是,您可以使用:lnext跳转到下一个错误,或者使用:lprev] l [ l (那些是小写的Ls),如果您具有 vim-unimpaired ,您可以这样做,因为如果没有Vim,就不应该使用Vim.

The actual answer is that you can use :lnext to jump to the next error, or :lprev, or ]l and [l (those are lowercase Ls) if you have vim-unimpaired, which you do, because you shouldn't use Vim without it.

这将实际上跳到下一个红色/错误突出显示的文本组,但是将跳到您的语法插件所指示的错误(并填充位置列表).在Vim中,不可能跳到特定的突出显示组,因为没有人愿意去弄清楚该怎么做.

This will not actually jump to the next red/error highlighted text group, but will jump to whatever your syntax plugin dictates is an error (and populates the location list). It is impossible in Vim to jump to a specific highlighting group, because no one has bothered to figure out how yet.

SRDispHiGrp 插件已关闭,但如果不能从名字中分辨出来,太让人迷惑和混淆了.

The plugin SRDispHiGrp comes close, but if you couldn't tell from the name, is too convulted and confusing for human use.

这篇关于跳至下一个错误/代码以红色突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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