ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Argument Noun

by nliberg ALL

Sublime Text plugin that extends Vintage with a function argument ('a') noun

Details

  • 2013.10.30.11.46.25
  • github.​com
  • github.​com
  • 11 years ago
  • 43 minutes ago
  • 11 years ago

Installs

  • Total 558
  • Win 386
  • Mac 86
  • Linux 86
Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Argument Noun

Overview

Argument Noun is a Sublime Text 3 plugin that extends the Vintage mode with a new arguments noun (text object): 'a'. It is is similar to the argtextobj plugin for Vim by Takahiro Suzuki.

Example: let's say you are editing foo(a, b*(c+d)) and the caret is somewhere inside the second argument. Triggering the change-inner-argument operation by typing cia then gives you foo(a, ) and you can insert some text to replace the old argument.

Read more about verbs, nouns and modifiers

Usage

  • delete an argument with daa
  • change inner argument with cia
  • select inner argument with via
  • yank inner argument with yia

Installation

or

  • clone to your Sublime Text 3 Packages folder located at
    • Windows: %APPDATA%\Sublime Text 3
    • OS X: ~/Library/Application Support/Sublime Text 3
    • Linux: ~/.config/sublime-text-3

Notes

The plugin is quite syntax agnostic. It however makes the assumption that an argument list is wrapped in parenthesis, is preceded by a function name identifier, and that arguments are comma separated.

If two identifiers are separated by only a newline and white space it is assumed that a right parenthesis after the first identifier is missing, i.e.

myfunction(a, b, c
x = 5

is handled as if c had been followed by ). This ensures that the argument region does not get too large in case of incorrect syntax.

Only commas at the correct level of nesting are treated as argument separators so eg. usage of Python tuples shouldn't pose any problem.

Limitations

Method calls without parenthesis (like in Ruby) are not supported at this time.

Comments intermingled with arguments are not supported at this time.

License

MIT License

Contributors

Created by Nils Liberg