CompleteParameter.vim
CompletEparameter is a plugin for complete function's parameters after complete a function.
If you like this plugin, please star it.
Screenshots
Features
- Complete parameters after select a complete item from the complete menu.
- After complete the parameters, jump to the first parameter and the select it.
- type
<m-n>
(default mapping) to jump to the next parameter in any position. - type
<m-p>
(default mapping) to jump to the previous parameter in any position.
Install
I suggest you to use a plugin manager, such vim-plug or other.
Plug 'tenfyzhong/CompleteParameter.vim'
- Manual
git clone https://github.com/tenfyzhong/CompleteParameter.vim.git ~/.vim/bundle/CompleteParameter.vim
echo 'set rtp+=~/.vim/bundle/CompleteParameter.vim'
vim -c 'helptag ~/.vim/bundle/CompleteParameter.vim/doc' -c qa!
Usage
Install a complete engine we have supported. Goto the complete item of the
complete menu you want to select, and then type (
(default mapping), the
parameters will be completed and jump the the first parameter.
<m-n>
/<m-p>
(default mapping) will jump
to the next/previous parameter and select it.
Mapping
(
Call the parameter completor.
<m-n>
Goto the next parameter and select it.
<m-p>
Goto the previous parameter and select it.
Options
g:complete_parameter_mapping_complete
option
The This option set the complete mapping. When you are in a complete item of the
complete menu, type this mapping, it'll complete the parameters.
Default: (
let g:complete_parameter_mapping_complete = '('
b:complete_parameter_mapping_complete
option
The This option can set different mapping fo defferent filetype. If this option set
for a filetype, it'll use this mapping to over the
g:complete_parameter_mapping_complete
value when you are edit this file.
augroup complete_parameter_setting
autocmd!
autocmd FileType go let b:complete_parameter_mapping_complete = '('
augroup END
g:complete_parameter_mapping_goto_next
option
The This option set the goto to next paramater mapping. When this mapping was called,
it'll goto to the next parameter.
Default: <m-n>
let g:complete_parameter_mapping_goto_next = '<m-n>'
g:complete_parameter_mapping_goto_previous
option
The This option set the goto to previous paramater mapping. When this mapping was called,
it'll goto to the previous parameter.
Default: <m-p>
let g:complete_parameter_mapping_goto_previous = '<m-p>'
g:complete_parameter_mapping_overload_down
option
The This option set the select next overload parameters mapping. When this
mapping was called, it'll delete the current completed paramaters and insert
the next overload parameters. It works only the cursor in the current
completed parameters. For example, v.erase(__first, __last)
, only the cursor
in the (
and )
, it can be work.
Default: <m-d>
let g:complete_parameter_mapping_overload_down = '<m-d>'
g:complete_parameter_mapping_overload_up
option
The This option set the select previous overload parameters mapping. When this
mapping was called, it'll delete the current completed paramaters and insert
the previous overload parameters. It works only the cursor in the current
completed parameters. For example, v.erase(__first, __last)
, only the cursor
in the (
and )
, it can be work.
Default: <m-u>
let g:complete_parameter_mapping_overload_up = '<m-u>'
g:complete_parameter_log_level
option
The This option set the log level.
4: only print error log.
2: print error and debug log.
1: print error, debug, trace
Default: 4
let g:complete_parameter_log_level = 4
Supported
Supported Complete Engine
Supported Language
- golang
- erlang
- c
- c++
- python
- javascript
- rust
Todo
- support language: objc
- support language: c#
- support language: typescript
- support engine: completor.vim
- support engine: neocomplete.vim
- support engine: deoplete.nvim
- support engine: clang_complete
- support nvim
Contributions
Contributions and pull requests are welcome.
Thanks
- johnzeng, support erlang
LICENSE
MIT License Copyright (c) 2017 tenfyzhong