Giter Club home page Giter Club logo

argtextobj.vim's Introduction

This is a mirror of http://www.vim.org/scripts/script.php?script_id=2699

This plugin provides a text-object 'a' (argument). You can
d(elete), c(hange), v(select)... an argument or inner argument in familiar ways.
That is, such as 'daa'(delete-an-argument) 'cia'(change-inner-argument) 'via'(select-inner-argument).
What this script does is more than just typing
  F,dt,
because it recognizes inclusion relationship of parentheses.

There is an option to descide whether the motion should go out to toplevel function or not in nested function application.

Examples:
  case1) delete An argument
      function(int arg1,    ch<press 'daa' here>ar* arg2="a,b,c(d,e)")
      function(int arg1<cursor here; and if you press 'daa' again..>)
      function(<cursor>)

  case2) change Inner argument
      function(int arg1,    ch<press 'cia' here>ar* arg2="a,b,c(d,e)")
      function(int arg1,    <cursor here>)
      
  case 3) smart argument recognition (g:argumentobject_force_toplevel = 0)
       function(1, (20<press 'cia' here>*30)+40, somefunc2(3, 4))
       function(1, <cursor here>, somefunc2(3, 4))
       
       function(1, (20*30)+40, somefunc2(<press 'cia' here>3, 4))
       function(1, (20*30)+40, somefunc2(<cursor here>4))

  case 4) smart argument recognition (g:argumentobject_force_toplevel = 1)
       function(1, (20<press 'cia' here>*30)+40, somefunc2(3, 4))
       function(1, <cursor here>, somefunc2(3, 4)) " note that this result is the same of above.
       
       function(1, (20*30)+40, somefunc2(<press 'cia' here>3, 4))
       function(1, (20*30)+40, <cursor here>) " sub-level function is deleted because it is a argument in terms of the outer function.

argtextobj.vim's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  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.