Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/vim/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
显示可能的下一个键的Vim插件?_Vim_Vim Plugin - Fatal编程技术网

显示可能的下一个键的Vim插件?

显示可能的下一个键的Vim插件?,vim,vim-plugin,Vim,Vim Plugin,是否有vim设置或插件来显示可能的下一个键(可能带有注释)?我想为我的映射提供类似的东西,这对初学者来说是一个巨大的好处 工作流程: 1. I type <leader> 2. Plugin pops up a sidebar with "gc - fugitive commit, gd - fugitive diff" etc 3. I can continue typing my command 1。我打字 2.插件弹出一个边栏,上面写着“gc-逃犯提交,gd-逃犯差异”等等

是否有vim设置或插件来显示可能的下一个键(可能带有注释)?我想为我的
映射提供类似的东西,这对初学者来说是一个巨大的好处

工作流程:

1. I type <leader>
2. Plugin pops up a sidebar with "gc - fugitive commit, gd - fugitive diff" etc
3. I can continue typing my command
1。我打字
2.插件弹出一个边栏,上面写着“gc-逃犯提交,gd-逃犯差异”等等
3.我可以继续键入我的命令

我有以下内容,但这仅适用于
映射组,例如来自NERD_Commenter的各种
c.
映射:

" <Leader>x     List all mappings defined in normal / visual mode that
" {Visual}<Leader>x start with <Leader>x (if any are defined and there is no
"           dedicated <Leader>x mapping itself).
function! s:MakeMappingHelperMappings()
    for l:i in range(65,90) + range(97,122)
        let l:char = nr2char(l:i)
        let l:map = '<Leader>' . l:char
        for l:mode in ['n', 'x']
            if ! empty(mapcheck(l:map, l:mode)) && empty(maparg(l:map, l:mode))
                execute printf('%snoremap %s :<C-u>%smap %s<CR>', l:mode, l:map, l:mode, l:map)
            endif
        endfor
    endfor
endfunction
call s:MakeMappingHelperMappings()
delfunction s:MakeMappingHelperMappings
“x列出在正常/可视模式下定义的所有映射
“{Visual}x以x开头(如果定义了任何,并且没有
“专用x映射本身)。
函数!s:MakeMappingHelperMappings()
对于范围(65,90)+范围(97122)内的l:i
设l:char=nr2char(l:i)
让l:map=''。l:char
对于l:模式为['n','x']
if!empty(映射检查(l:map,l:mode))&&empty(maparg(l:map,l:mode))
执行printf(“%snoremap%s:%smap%s”,l:mode,l:map,l:mode,l:map)
恩迪夫
外循环
外循环
端功能
调用s:MakeMappingHelperMappings()
dels函数:MakeMappingHelperMappings
这需要在所有插件之后获得,因此将其放入
~/.vim/plugin/zzz_mapping_help.vim
,而不是
~/.vimrc


我看不出
的东西有什么用处,那会给你太多的选择…

如果有,那会很烦人。。。。