« PowerShell Fortune | Main | Distant Shores - A Visual Studio Color S... »
I've been using Vim to edit my PowerShell scripts for a while. I get full syntax highlighting and indentation thanks to Peter Provost's excellent scripts:
These work great most of the time, but a couple of things had been nagging me for a while:
:set foldmethod=syntax
Fortunately, both of these issues are pretty easy to fix. To enable syntax-based folding, I just modified the syntax file to add this:
" support folding for blocks syntax region psBlock start="{" end="}" transparent fold
To disable the comment indentation, I edited the Indent file and remove the # character as an indent key:
setlocal cindent cinoptions& cinoptions+=+0 cinkeys-=0#
Seems to be working fine for me, and it will now stop driving me crazy .
About
Tomas Restrepo is co-founder of devdeo. His interests include .NET, Connected Systems, PowerShell and, lately, dynamic programming languages. More...
email: tomas@winterdom.com msn: tomasr@passport.com twitter: tomas_restrepo
Technorati Profile
Syndicate
Ads
Links
Categories
Statistics
Blogroll
Post Archive
Other
Copyright © 2002-2008, Tomas Restrepo.
Powered by: newtelligence dasBlog 1.9.7174.0