Home > Match-Bracket-for-Objective-C

Match-Bracket-for-Objective-C

Match-Bracket-for-Objective-C is a project mainly written in Vim Script, it's free.

Automatically inserts matching starting bracket when ] is pressed.

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

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!

Previous:gams.vim