vim - Three curly brackets together in php source code -
i downloaded finish source code of php php.net (php 5.4.0 [tar.bz2]). using 3 curly brackets given below (the next code snippet extracted form ext/ctype/ctype.c.)
/* {{{ proto bool ctype_digit(mixed c) checks numeric character(s) */ static php_function(ctype_digit) { ctype(isdigit); } /* }}} */
does have thought why using these 3 curly brackets together?
they vim fold markers, create easy collapse , expand text inbetween triple curly braces in vim, in illustration shown alternating between:
... /* {{{ proto bool ctype_digit(mixed c) checks numeric character(s) */ static php_function(ctype_digit) { ctype(isdigit); } /* }}} */ ...
and just
... /* {{{ proto bool ctype_digit(mixed c) ...
if @ end of file find them, you'll find block this:
/* * local variables: * tab-width: 4 * c-basic-offset: 4 * end: * vim600: sw=4 ts=4 fdm=marker * vim<600: sw=4 ts=4 */
which more-obvious indicator these comments relate vim.
php vim folding curly-braces
No comments:
Post a Comment