Code Monkey home page Code Monkey logo

Comments (4)

tenfyzhong avatar tenfyzhong commented on June 19, 2024

I think you shoud map smap too.

from completeparameter.vim.

cjun714 avatar cjun714 commented on June 19, 2024

I have set smap, it's not working, setting:
smap (complete_parameter#goto_next_parameter)
imap (complete_parameter#goto_next_parameter)

Here is an example:

  1. input:
    os.Chmod("myname|", mode) // '|' is cursor position
  2. press Tab, expected result should be:
    os.Chmod("myname", |mode) // '|' is cursor position
  3. but result is :
    os.Chmod("myname    |", mode)

If map , result is right(as step 2)
If map , result is not expected(as step 3)

Plugins I am using (first to last in vim-plug):

  1. ultisnips
  2. deoplete
  3. CompleteParameter

from completeparameter.vim.

tenfyzhong avatar tenfyzhong commented on June 19, 2024

Please give me a minimum configuration.

from completeparameter.vim.

cjun714 avatar cjun714 commented on June 19, 2024

Sorry for late response, please check below config, unnecessary part has been removed:

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" vim-plug
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
call plug#begin('~/.local/share/nvim/plugged')

Plug 'Yggdroot/LeaderF', { 'do': './install.sh' }
Plug 'Valloric/YouCompleteMe', { 'do': './install.py --clang-completer --go-completer' }
Plug 'SirVer/ultisnips'
Plug 'tenfyzhong/CompleteParameter.vim'

call plug#end()

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" global
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set noshowmode      " necessary for plugin echodoc.vim

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Key mapping
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
imap jj <Esc>
let mapleader=" "
" --------------------------------------------------------------------
map <leader>q :q!<CR>
nmap <C-q> :bp\|bd #<CR>

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Yggdroot/LeaderF
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
nnoremap <C-p> :call CtrlP('LeaderfFile')<CR>
nnoremap <C-b> :call CtrlP('LeaderfBuffer')<CR>
nnoremap <C-n> :call CtrlP('LeaderfMru')<CR>
nnoremap <C-r> :LeaderfBufTag<CR>
nnoremap <leader>j :LeaderfTag<CR>

" prevent opening file inside buffers like NERDTree
function! CtrlP(command)
    let c = 0
    let wincount = winnr('$')
    " Don't open it here if current buffer is not writable (e.g. NERDTree)
    while !empty(getbufvar(+expand("<abuf>"), "&buftype")) && c < wincount
        exec 'wincmd w'
        let c = c + 1
    endwhile
    exec a:command
endfunction

let g:Lf_StlSeparator = { 'left': "\ue0b0", 'right': "\ue0b2" }
let g:Lf_WindowHeight = 0.30
let g:Lf_RootMarkers = ['.project', '.root', '.svn', '.git']
let g:Lf_WorkingDirectoryMode = 'Ac'
let g:Lf_CacheDirectory = expand('/tmp/vim/cache')
let g:Lf_ShowRelativePath = 0
let g:Lf_HideHelp = 1
let g:Lf_StlColorscheme = 'powerline'
let g:Lf_PreviewResult = {'Function':0, 'BufTag':0}

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" tenfyzhong/CompleteParameter.vim
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
inoremap <silent><expr> ( complete_parameter#pre_complete("()")
smap <Tab> <Plug>(complete_parameter#goto_next_parameter)
imap <Tab> <Plug>(complete_parameter#goto_next_parameter)
" smap <c-k> <Plug>(complete_parameter#goto_previous_parameter)
" imap <c-k> <Plug>(complete_parameter#goto_previous_parameter)

let g:AutoPairs = {'[':']', '{':'}',"'":"'",'"':'"', '`':'`'}
inoremap <buffer><silent> ) <C-R>=AutoPairsInsert(')')<CR>

let g:complete_parameter_use_ultisnips_mapping = 0

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" SirVer/ultisnips
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"

let g:UltiSnipsSnippetDirectories=["UltiSnips", "UltiSnips+"]

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Valloric/YouCompleteMe
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py'

let g:ycm_add_preview_to_completeopt = 0
let g:ycm_show_diagnostics_ui = 0
let g:ycm_server_log_level = 'info'
let g:ycm_min_num_identifier_candidate_chars = 2
let g:ycm_collect_identifiers_from_comments_and_strings = 1
let g:ycm_complete_in_strings=1
let g:ycm_key_invoke_completion = '<c-z>'
set completeopt=menu,menuone

noremap <c-z> <NOP>

let g:ycm_semantic_triggers =  {
           \ 'c,cpp,python,java,go,erlang,perl': ['re!\w{2}'],
           \ 'cs,lua,javascript': ['re!\w{2}'],
           \ }

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.