Match Bracket for Objective-C : Automatically inserts matching starting bracket when ] is pressed.
| script karma
Downloaded by 1174
Comments, bugs, improvements
script versions (upload new version)
|This is essentially TextMate's "Insert Matching Start Bracket" feature implemented in vim script. Makes it a lot more pleasant to write Objective-C.
Just type ] in insert mode after an object or method you want to wrap in brackets and this will wrap it appropriately; to escape out of it once you're finished, simply type ] again.
For instance, where | is the cursor:
"foo|" becomes "[foo |]" after ] is pressed.
"foo bar|" becomes "[foo bar]|"
"foo: bar|" becomes "foo: [bar |]"
"foo bar: baz|" becomes "[foo bar: baz]|"
Certain useful keywords are also wrapped intelligently, for example:
"return foo|" becomes "return [foo ]|"
"@selector: foo|" becomes "[@selector: foo]|"
Hope you like it!
|Move objc_matchbracket.vim to ~/.vim/ftplugin or equivalent.|
Click on the package to download.
ip used for rating: 220.127.116.11