在升级到Ubuntu 18.04之后,在gvim中找不到ack-grep:命令 [英] ack-grep: command not found in gvim after upgrade to Ubuntu 18.04

查看:299
本文介绍了在升级到Ubuntu 18.04之后,在gvim中找不到ack-grep:命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行:在gvim中确认任何现在给出

  || / bin / bash:ack-grep:找不到命令

ack-grep已经是最新版本2.22-1)

它在Ubuntu 16.04中工作正常。我在〜/ .vim / bundle / ack.vim /

中有ack.vim插件假设你正在使用这个

解析方案

a href =https://github.com/mileszs/ack.vim =nofollow noreferrer> ack.vim 插件。然后你不需要做任何事情。



Ack.vim将按以下顺序搜索可执行文件: ack-grep ack 。你可以用 g:ackprg 覆盖它。如果您设置了 g:g:ackprg ,那么您需要将 g:ackprg 设置为

  let g:ackprg ='/ usr / local / bin / ack'

就个人而言,我会避免设置 g:ackprg 变量,除非您真的需要

你可能也想看看比 ack 更快的grep程序。例如 Silver Searcher ripgrep 。我也没有真正发现像ack.vim这样的插件需求,我只是设置了'grepprg''grepformat'并用搜索:grep


Running :Ack anything in gvim now gives

|| /bin/bash: ack-grep: command not found

ack-grep is already the newest version (2.22-1)

It was working fine in Ubuntu 16.04. I have the ack.vim plugin in ~/.vim/bundle/ack.vim/

解决方案

Assuming you are using this ack.vim plugin. Then you shouldn't have to do anything.

Ack.vim will search for executables in the following order: ack-grep, ack. You can override this with g:ackprg. If you have set g:g:ackprg then you will need to adjust g:ackprg to be set to where the ack executable path.

let g:ackprg = '/usr/local/bin/ack'

Personally, I would avoid setting the g:ackprg variable unless you really need to.

You may also want to look into faster grep program's than ack. e.g. The Silver Searcher or ripgrep. I also haven't really found a need for a plugin like ack.vim, I just set 'grepprg' and 'grepformat' and search with :grep.

这篇关于在升级到Ubuntu 18.04之后,在gvim中找不到ack-grep:命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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