Code Monkey home page Code Monkey logo

pdv's Introduction

PDV - PHP Documentor for VIM - 2

This is version 2 of PDV - PHP Documentor for VIM, your tool of choice for generating PHP doc blocks. It is a complete rewrite of version 1, which contained code written back in 2005 and earlier. As a result, the code is now way more maintainable and you gain exciting new features:

  • Templating support through Vmustache
  • Integration with UltiSnips to complete your docs directly after generation

Try it out now.

Requirements

Vmustache is a required plugin for PDV to work

Install

You should install PDV through a VIM plugin manager of your choice. I recommend Vundle for that purpose, but others should work, too. With Vundle you need

Bundle 'tobyS/pdv'

in your .vimrc and then run :BundleInstall in a new VIM instance.

Before using PDV you must set the variable pdv_template_dir which points to your templates. After that, you should map one of the following functions to a key of your choice:

pdv#DocumentCurrentLine()

Generates the doc block as you know it from PDV 1, but using the templates from your template directory.

pdv#DocumentWithSnip()

This function requires UltiSnips as a prerequisite. If you have that installed, your templates will be used as snippets and you will be put into the first tab right after the doc block was generated.

My config for PDV looks like this:

let g:pdv_template_dir = $HOME ."/.vim/bundle/pdv/templates_snip"
nnoremap <buffer> <C-p> :call pdv#DocumentWithSnip()<CR>

There are examples for templates (both a non-snip and a snip version) shipped with PDV.

pdv's People

Contributors

mikkelpaulson avatar n7st avatar salcode avatar tobys avatar

Watchers

 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.