• Stars
    star
    251
  • Rank 161,833 (Top 4 %)
  • Language
    Vim Script
  • Created over 14 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PHP Integration environment for Vim

PHP Integration for VIM

Description

This project contains the most feature complete and up to date PHP Integration for Vim. It began as a fork of the largely outdated VIP (formerly PDV), but has morphed into it's own project.

It is intended to include the best PHP specific plugins, configurations and resources for editing PHP. Special care has been taken to include the best, keep them up to date and make sure everything plays well together.

It doesn't attempt to include the best programming plugins, so you can use the plugins you prefer.

The bottom of this readme includes a list of many great plugins that work well with PIV. If you are looking for an excellent VIM configuration, please checkout The Ultimate VIM Configuration.

Features

Updated Syntax

Updated for PHP 5.3

The list of PHP constants, functions, and classes was updated to be current with PHP 5.3. Many new classes were added in the 5.2 and 5.3 branches and the distributed version only covers up to 5.1.4.

Better Fold Support

This plugin can fold PHP functions and/or classes, properties with their PhpDoc, without manually adding marker style folds ({{{ and }}}) http://www.vim.org/scripts/script.php?script_id=1623

Can be turned off by setting let g:DisableAutoPHPFolding = 1 in your .vimrc file.

PHP Doc Gen

Generate phpDocumentor conforming documentation blocks for your PHP code.

To use place cursor on line with class, function or variable definition and type ,pd (in n mode)

Better Completion

PHP completion script for use with omniComplete. Using Shawn Biddle's excellent phpcomplete.vim script

Completion from current file, included files, tags and php builtin: * classes (after new), * functions
* variables * constants * language keywords

Either use or install SuperTab to use. By default will show a preview of the function call.

Completion is done via context, for example after -> and :: options limited to funcs and vars.

Examples

Example class which has a TAGS file generated for it somewhere class SomeClass { private function _private_method() {} // never shows up in completion list public static function staticMethod() {} // only shows up when using completion on SomeClass:: public function completeMe() {} // only shows up when using completion on $instance_of_someclass-> }

Non-static completion

$instance = new SomeClass; 
... 
$instance-><C-X><C-O> to display the omnicompletion menu (see :help ins-completion) 
$instance->completeMe(); // will autoselect completeMe since it's the only public non-static method 

Static completion

SomeClass::<C-X><C-O> to display omnicompletion menu 
SomeClass::staticMethod(); // once again will autoselect staticMethod since it's the only public static method 

Singleton completion

$instance = SomeClass::getInstance(); 
$instance-><C-X><C-O> complete just like non-static 

Other features

  • Correct restriction of static or standard methods based on context ( show only static methods with :: and only standard with ->)
  • Real support for self:: and $this-> with the aforementioned context restriction
  • Constant variable completion (not just define(VARIABLE, 1) but const VARIABLE = 1)

Better indenting w/automatic formatting

Custom php indenting file for VIM

Full (and current [5.3]) PHP Manual

Simply hit K (shift+k) on any function to see full documentation file for that function even offline.

Recommendations

It isn't my intention to provide php specific functionality when a good general purpose solution exists.

The following plugins are recommended and can be found in my Ultimate VIM Configuration.

More Repositories

1

cobra

A Commander for modern Go CLI interactions
Go
37,720
star
2

viper

Go configuration with fangs
Go
27,043
star
3

spf13-vim

The ultimate vim distribution
Vim Script
15,558
star
4

afero

A FileSystem Abstraction System for Go
Go
5,913
star
5

cast

safe and easy casting from one type to another in Go
Go
3,073
star
6

cobra-cli

Cobra CLI tool to generate applications and commands
Go
695
star
7

hyde

Port of Mdo's excellent theme to Hugo
CSS
553
star
8

nitro

Quick and easy performance analyzer library for golang
Go
300
star
9

jwalterweatherman

So you always leave a note
Go
261
star
10

spf13.com

Hugo Based website of Steve Francia
CSS
143
star
11

dagobah

dagobah is an awesome RSS feed aggregator & reader written in Go inspired by planet
Go
136
star
12

kaiju

Open source discussion server
JavaScript
113
star
13

herring-cove

Port of arnp's excellent theme to Hugo
CSS
43
star
14

vim-colors

Collection of color schemes for VIM
Vim Script
40
star
15

mongoProducts

Sample data for Mongo Product Presentation
37
star
16

tri

Todo CLI app
Go
32
star
17

dotfiles

spf13's dotfiles
Shell
27
star
18

firstGoApp-Planet

Built for OSCON2014 .. Each step is in it's own branch
Go
20
star
19

Vogon

A MongoDB PHP based blog
JavaScript
16
star
20

Milieu

Location based check in application powered by MongoDB written in Ruby
Ruby
13
star
21

cobra.dev

Cobra website
HTML
8
star
22

relativeTime

Golang relative date formatting (1 day ago, in 2 weeks), etc.
7
star
23

stevefrancia.com

Homepage Website for SteveFrancia.com
HTML
6
star
24

wp_GitHub_Code_Viewer

Plugin for Wordpress to insert file from github into a blog post
PHP
5
star
25

spf13

5
star
26

spf13.github.com

Git Hub Page for spf13
4
star
27

vim-gocode

Vim Plugin of nsf/gocode for use with Vundle/Pathogen
Vim Script
3
star
28

vimbrant

Harnessing the power of vim to turn source into highlighted html
3
star
29

One-More-For-The-Road

A Skeleton App for Sinatra using MongoDB
JavaScript
3
star
30

instant

Instant theme for Hugo (derived from Black Tie Instant)
HTML
2
star
31

Autostamp

Auto update the time and version stamp in the header for VIM
Vim Script
1
star
32

YourFirstRubyMongoDBApp

Skeleton for your first ruby MongoDB app to go along with my workshop
Ruby
1
star