Code Monkey home page Code Monkey logo

Comments (4)

tenfyzhong avatar tenfyzhong commented on July 19, 2024

当前触发参数补全插入()的情况有两种。

  1. 触发补全成功,函数参数列表为空。这种情况是不需要回到括号中间的。
  2. 触发补全失败,比如定义定义函数的时候,这时候按左括号补会出右括号,这时候回到括号中间。这个在
    a51cb44 的提交中已经处理好。你看一下是不是已经更新到这个之后了。

from completeparameter.vim.

tenfyzhong avatar tenfyzhong commented on July 19, 2024

@tracyone 麻烦更新一下看还有没有问题,没问题就关了issue

from completeparameter.vim.

tracyone avatar tracyone commented on July 19, 2024

你好,下面的配置是最小的,可复现我所说的现象的配置:

set nocompatible
set whichwrap=b,h,l,<,>,[,]  "list of menu_flags specifying which commands wrap to another line
let &rtp=&rtp.','.$HOME.'/.vim/bundle/CompleteParameter.vim'
let &rtp=&rtp.','.$HOME.'/.vim/bundle/YouCompleteMe'
let &rtp=&rtp.','.$HOME.'/.vim/bundle/delimitMate'
let &rtp=&rtp.','.$HOME.'/.vim/bundle/ultisnips'

let g:delimitMate_nesting_quotes = ['"','`']
let g:delimitMate_expand_cr = 0
let g:delimitMate_expand_space = 0

let g:UltiSnipsUsePythonVersion = 2
let g:UltiSnipsExpandTrigger='<c-j>'
let g:UltiSnipsListSnippets ='<c-tab>'
let g:UltiSnipsJumpForwardTrigge='<c-j>'
let g:UltiSnipsJumpBackwardTrigge='<c-k>'
let g:UltiSnipsSnippetDirectories=['bundle/snippets']
let g:UltiSnipsSnippetsDir=$HOME.'/.vim/bundle/snippets'

let g:ycm_global_ycm_extra_conf = $HOME . '/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
let g:ycm_autoclose_preview_window_after_insertion = 1
let g:ycm_complete_in_comments = 1
let g:ycm_confirm_extra_conf=0
let g:syntastic_always_populate_loc_list = 1
let g:ycm_key_invoke_completion = '<C-Space>'
let g:ycm_semantic_triggers = {
            \   'c' : ['->', '    ', '.', ' ', '(', '[', '&'],
            \     'cpp,objcpp' : ['->', '.', ' ', '(', '[', '&', '::'],
            \     'perl' : ['->', '::', ' '],
            \     'php' : ['->', '::', '.'],
            \     'cs,java,javascript,d,vim,python,perl6,scala,vb,elixir,go' : ['.'],
            \     'ruby' : ['.', '::'],
            \     'lua' : ['.', ':'],
            \     'vim' : ['$', '&', 're![\w&$<-][\w:#<>-]*']
            \ }

let g:ycm_collect_identifiers_from_tag_files = 1
let g:ycm_filetype_blacklist = {
            \ 'tagbar' : 1,
            \ 'qf' : 1,
            \ 'notes' : 1,
            \ 'unite' : 1,
            \ 'text' : 1,
            \ 'vimwiki' : 1,
            \ 'startufy' : 1,
            \ 'pandoc' : 1,
            \ 'infolog' : 1,
            \ 'mail' : 1
            \}

filetype plugin indent on
syntax on

其中whichwrap选项起关键作用,注释掉它既不会

下面,你打开一个c文件,做如下编辑,当输入printf,这个时候虽然有弹出补全框,但是并不是ycm的semantic补全,而是普通id补全,所以这个时候输入(的时候,你的插件不会起作用,当像上面设置whichwrap的时候,光标会跑到外面去。

#include <stdio.h>

int main(int argc, char *argv[])
{
	printf
	return 0;
}

from completeparameter.vim.

tenfyzhong avatar tenfyzhong commented on July 19, 2024

@tracyone 感谢反馈。 950ddc4 这个提交已经修复,在develop分支,麻烦更新验证一下。

from completeparameter.vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.