vim-scripts / php-annotations-syntax Goto Github PK
View Code? Open in Web Editor NEWsyntax highlighting for php annotations
Home Page: http://www.vim.org/scripts/script.php?script_id=4554
syntax highlighting for php annotations
Home Page: http://www.vim.org/scripts/script.php?script_id=4554
This is a mirror of http://www.vim.org/scripts/script.php?script_id=4554 Small script to add annotations highlighting to php syntax. Annotations within comments are highlighted with pre-defined SpecialComment highlight group name (used for example for backslash escapes in string literals). Annotations highlighting is useful when they are used as more then documentation blocks or comments, like for actual program flow control, as doctrine ORM is using them. Some people might consider such use of comments, as part of the program logic, to be bad practice, and the script author here tends to agree. But this is how annotation syntax works in php, so this is how they are used anyway. Doctrine ORM tends to look for annotations anywhere within a comment line, but only annotations that start at the beginning of a comment line will be highlighted here. php annotations use docBlock comments (documentation comment blocks, beginning with /** and ending with */) and the main use case for this syntax script is to contrast the regular annotations with any of them accidentally placed within simple comments, where they have no effect, so you can spot them easier. If you find the highlighting annoying with your color scheme or with your annotations usage in php, you may use a command like :highlight link SpecialComment Number to change the appearance (you can replace Number above with some other highlight group you may like), or you can disable the script with the :let g:php_annotations_syntax = 0 command in your .vimrc file. If and when the main php syntax file provided with Vim ever gets updated to include annotations, this script will become obsolete. That main file is getting quite old with all new php functions and classes added by every new php version; currently there are several newer alternatives on the Vim scripts site, but they like to replace, instead of extend, the main file provided by the distribution.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.