#1547: Mass-update vim modelines
----------------------+-----------------------------------------------------
Reporter: petdance | Owner: petdance
Type: cage | Status: closed
Priority: normal | Milestone:
Component: none | Version: 2.2.0
Severity: medium | Resolution: done
Keywords: | Lang:
Patch: | Platform:
----------------------+-----------------------------------------------------
Changes (by plobsing):
* status: new => closed
* resolution: => done
Comment:
I've modified the modelines in master appropriately.
The modeline setting is cinoptions='\:2=2' (indent labels by 2, indent
statements following labels by 2).
We already have a tool for getting all the C files -
Parrot::Distribution.pm. To modify modelines en mass:
1. get paths to c language files from Parrot::Distribution
2. check that each file has exactly one match for your "from" regex
3. search and replace
Example:
{{{
perl -Mlib=lib -MParrot::Distribution -E 'say $_->path for
Parrot::Distribution->new->get_c_language_files' | xargs sed -i
"s/vim:\(.*\):$/vim:\1 cinoptions='\\\\:2=2' :/"
}}}
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1547#comment:4>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets