简体   繁体   English

为什么我的vim bash命令自动完成报错?

[英]Why is my vim bash command auto-completion reporting error?

Hi today for unknown reason, if I typed the following command "vim \tab" in bash terminal to hopefully get an auto-completion, I get the following error:嗨,今天不知什么原因,如果我在 bash 终端中键入以下命令“vim \tab”以希望获得自动完成,我会收到以下错误:

$ vim bash: command substitution: line 22: syntax error near unexpected token `}'
bash: command substitution: line 22: `        }'

This error does not happen if I typed '\tab` at the end of other commands such as 'ls', or even an alias of vim such as 'alias v=vim'.如果我在其他命令(例如 'ls' 或 vim 的别名(例如 'alias v=vim')的末尾键入 '\tab`)不会发生此错误。

This error does not happen in another gnome-terminal, either.在另一个 gnome 终端中也不会发生此错误。

Not sure what is causing this (a vim plugin?).不确定是什么原因造成的(vim 插件?)。 Any idea?任何想法? thanks.谢谢。

Found the root cause.找到了根本原因。 I created an alias done, and the "done" conflicts with the bash keyword "done".我创建了一个别名 done,并且“done”与 bash 关键字“done”冲突。 Problem solved by renamed the alias.通过重命名别名解决了问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM