Giter Club home page Giter Club logo

completeparameter.vim's Introduction

CompleteParameter.vim Build Status

CompletEparameter is a plugin for complete function's parameters after complete a function.

If you like this plugin, please star it.

Screenshots

cp_screenshorts

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

The g:complete_parameter_mapping_complete option

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 = '('

The b:complete_parameter_mapping_complete option

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

The g:complete_parameter_mapping_goto_next option

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>'

The g:complete_parameter_mapping_goto_previous option

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>'

The g:complete_parameter_mapping_overload_down option

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>'

The g:complete_parameter_mapping_overload_up option

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>'

The g:complete_parameter_log_level option

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

Contributions

Contributions and pull requests are welcome.

Thanks

LICENSE

MIT License Copyright (c) 2017 tenfyzhong

completeparameter.vim's People

Contributors

tenfyzhong avatar

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.