Giter Club home page Giter Club logo

php.vim's Introduction

php.vim

This project is a fork of php.vim--Garvin which in turn is an update of the php.vim script which in turn is an updated version of the php.vim syntax file distributed with Vim. Whew!

Installation

If you don't have a preferred installation method, pathogen.vim is quick and simple. With pathogen.vim installed, run the following commands:

cd ~/.vim/bundle
git clone https://github.com/StanAngeloff/php.vim.git

Configuration

  • g:php_syntax_extensions_enabled, g:php_syntax_extensions_disabled
    b:php_syntax_extensions_enabled, b:php_syntax_extensions_disabled

    A list of extension names (lowercase) for which built-in functions, constants, classes and interfaces is enabled / disabled.

Overriding Highlighting

Syntax highlighting can be configured to distinguish groups by overriding the defaults. For example, all code in PHP comments is highlighted as phpComment, however there are pieces you can tweak, e.g., how @tags appear. There are many groups you can choose from. Here is how you can override PHP @tags and $parameters in comments to appear in a different group:

" Put at the very end of your .vimrc file.

function! PhpSyntaxOverride()
  hi! def link phpDocTags  phpDefine
  hi! def link phpDocParam phpType
endfunction

augroup phpSyntaxOverride
  autocmd!
  autocmd FileType php call PhpSyntaxOverride()
augroup END

Overriding Highlighting

Developing

When you install php.vim using your preferred installation method, all the files needed are already in place.

The project comes with a Dockerfile which can be used to rebuild the syntax file.

docker build -t stanangeloff/php.vim .
docker run --rm -i -v "$PWD":/var/php -t stanangeloff/php.vim > /tmp/php.vim && cat /tmp/php.vim | sed 's/\x0D$//' > syntax/php.vim
docker rmi stanangeloff/php.vim

php.vim's People

Contributors

stanangeloff avatar swekaj avatar rodrigore avatar taluu avatar jaywilliams avatar commonquail avatar paulyg avatar baldrs avatar incognito avatar boxofrox avatar synthetiv avatar msjyoo avatar mikaelz avatar ruchee avatar sudar avatar gabesullice avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.