Vim:在消息对话框中用长行换行: [英] Vim: wrap long :make lines in message dialog?

查看:53
本文介绍了Vim:在消息对话框中用长行换行:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当执行在临时vim缓冲区中显示其内容的:make 命令时,是否有任何方法可以将这些行在终端边缘进行软包装?大多数控制台主机没有侧面滚动功能,并且:make 中出现的任何长行都在vim中被完全截断(即事后扩展终端宽度无法恢复它们).

When executing a :make command that displays its content in a temporary vim buffer, is there any way to have these lines soft-wrapped at the edge of the terminal? Most console hosts do not have side scrolling and any long lines that come out of :make are completely truncated in vim (i.e. expanding the terminal width after-the-fact does not recover them).

我无法以任何有意义的方式与包含:make 结果的缓冲区进行交互(:set wrap zl )尽管我确定存在一种方法,但是这将允许我检索这些内容.

I'm not able to interact with the buffer containing the :make results in any meaningful way (:set wrap or zl) that would allow me to retrieve those contents, though I am sure a way exists.

我担心我的google fu在这方面完全使我失望,因为异常数量众多的完全不相关的问题涉及自动包装文本,提交日志和在vim中缓冲内容.

I'm afraid my google fu has completely failed me on this one due to the exceptional number of wholly unrelated issues involve automatic wrapping of text, commit logs, and buffer content in vim.

推荐答案

该窗口称为 quickfix窗口,文档说:在quickfix窗口中,每一行都是一个错误."因此似乎缺少包装是一个功能.

The window is calld quickfix window and the docs says: "In the quickfix window, each line is one error." So it seems the absent of wrapping is a feature.

您可以尝试添加 BufReadPost BufWinEnter 事件以更改窗口中的选项:

You can try to add BufReadPost or BufWinEnter events to change options in the window:

au BufReadPost quickfix setlocal wrap

但是我不确定vim是否允许.

but I'm not sure vim allows that.

这篇关于Vim:在消息对话框中用长行换行:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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