是否可以在 linux 中的 vim 中调用 :make 而不显示 shell [英] Is it possible to call :make in vim in linux without showing the shell

查看:28
本文介绍了是否可以在 linux 中的 vim 中调用 :make 而不显示 shell的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近一直在尝试使用 :make 但我不喜欢 vim 必须先切换到显示 shell 输出并需要一个输入按键,然后它显示我什么我认为是基于 'errorformat' 收集的错误列表,我还需要按 Enter 确认.我更喜欢有一个不需要按键确认的简短的OK"消息,或者如果有任何错误,vim 会打开 :cwindow.

I've been trying to experiment with using :make recently but I don't like that vim has to switch to showing the shell output first and require one enter keypress, then it shows me what I think is a list of the collected errors based on 'errorformat' which I also need to confirm by pressing enter. I would prefer to just have a short "OK" message that does not require confirmation by a keypress, or that vim would open the :cwindow if there were any errors.

推荐答案

我使用下一行只是为了你写的确切目的:

I'm using next line just for exact purpose you wrote:

nnoremap <leader>m :silent make\|redraw!\|cc<CR>

如果是这种情况,

cc 最后会显示第一个错误或 No errors 消息.

cc in the end shows first error or No errors message if this is the case.

这篇关于是否可以在 linux 中的 vim 中调用 :make 而不显示 shell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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