Match Bracket for Objective-C : Automatically inserts matching starting bracket when ] is pressed.
script karma |
Rating 62/20,
Downloaded by 2894 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Michael Sanders |
|
script type |
ftplugin |
|
description |
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! |
|
install details |
Move objc_matchbracket.vim to ~/.vim/ftplugin or equivalent. |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 142.132.191.50
|