Tip: #1321 - Fold a C sharp region
Created: September 7, 2006 3:12 Complexity: basic Author: John Cena Version: n/a Karma: 16/6 Imported from: Tip#1321
How to fold the following region
#region
...
#endregion
with the keystroke zf% ?
Just add the following line in your cs.vim file placed in syntax folder beneath your vimruntime path.
let b:match_words = '\s*#\s*region.*$:\s*#\s*endregion
It works even if the cursor is not on the "#region" keyword.
For more help please refer to :help matchpairs
Thanks.
Comments
And copy the "matchit.vim" file from your macros folder to plugin folder for it to automatically load everytime a window opens.
excusemeashish--AT--gmail.com , September 7, 2006 3:16
And copy the "matchit.vim" file from your macros folder to plugin folder for it to automatically load everytime a window opens.
excusemeashish--AT--gmail.com , September 7, 2006 3:16