简体   繁体   English

“#”(哈希键)后的VIM cmdline完成

[英]VIM cmdline completion after '#' (hash key)

SETUP 设定

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 31 2015 23:35:48) VIM-Vi IMproved 7.4(2013年8月10日,2015年3月31日编译23:35:48)
Included patches: 1-488, 576 包含的补丁程序:1-488,576
Modified by pkg-vim-maintainers@lists.alioth.debian.org 由pkg-vim-maintainers@lists.alioth.debian.org修改

set wildmode? wildmode=list:longest,full

  • some plugins: ie UltiSnips 一些插件:即UltiSnips

Problem 问题

when typing a :call command, where I'd like to invoke some routine of a plugin directely, cmdline completion (with TAB key, by default) stops after the # . 当你键入:call命令,在这里我想directely调用插件的一些常规,CMDLINE完成 (与TAB键,默认情况下)后停止#

ie: I want to complete :call UltiSnips#ListSnippets() 即:我想完成:call UltiSnips#ListSnippets()
where many other UltiSnips routines are available. 还有许多其他UltiSnips例程可用的地方。

  • When typing :call ult and press TAB , I get: 当键入:call ult并按TAB时 ,我得到:
    :call UltiSnips# with a listing of all possible matches. :call UltiSnips# ,并列出所有可能的匹配项。

    1. When I press TAB further, it toggles through all matches correctely 当我进一步按TAB键时,它会正确切换所有匹配项

    2. BUT if I try to contiue typing the function name like :call UltiSnips#List and hit TAB , it wont complete the funtion's name, but ANY completion, that is starting with List (what I typed after the # ; ListTemplateSuffixes( in my case) 但是,如果我尝试继续输入函数名称,如:call UltiSnips#List并按TAB ,它将无法完成功能的名称,但是任何完成都以List开头(我在#之后输入; ListTemplateSuffixes(在我的情况下)

This has been fixed by recent Vim patch 7.4.516: issue 253: completing function name with a # does not work . 最近的Vim补丁7.4.516已修复此问题问题253:使用#补全函数名不起作用

So, you just need to update your Vim (by compiling it yourself; or just wait until your distribution provides such upgrade). 因此,您只需要更新Vim(可以自己编译;或者等到您的发行版提供这种升级)。

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

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