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
  • 10 years ago
  • 1 hour ago
  • 10 years ago

Installs

  • Total 543
  • Win 379
  • Mac 81
  • Linux 83
Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6
Windows 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 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 1 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 1 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 1 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