Vim (for Vi Improved) is a screen-oriented text editor originally created for the Unix operating system. This guide install some helpful plugins for PHP development.

This howto is tested on:

  • Debian 10.0 Buster


This howto requires:


Detect if sudo is available (“command” is used if not):

command type -f 'sudo' &>'/dev/null' && cmdProxy='sudo'

Install the required software:

${cmdProxy} apt install 'unzip'

A graphical user interface for Vim exists: gvim, using the GTK toolkit. Install it with:

${cmdProxy} apt install 'vim-gtk3'

A modern alternative to Vim exists: NeoVim a.k.a. nvim. Install it with

${cmdProxy} apt install 'neovim-qt'


PDV : phpDocumentor for Vim

PDV is a tool generating automatically the code documentation of a PHP script. Install PDV:

command mkdir -p "${HOME}/.vim"
command wget "" \
command echo '
" PDV : phpDocumentor for Vim
source ~/.vim/php-doc.vim
inoremap <C-P> <ESC>:call PhpDocSingle()<CR>i
nnoremap <C-P> :call PhpDocSingle()<CR>
vnoremap <C-P> :call PhpDocRange()<CR>' \
   >> "${HOME}/.vimrc"

This tool is used by pressing <Ctrl>+ <P> when the cursor is on a class, function, constant, etc. declaration.


Vimball is a helper easing development of Vim extensions. Install Vimball:

command mkdir -p "${HOME}/.vim"
command wget "" \
    --output-document=- \
  | command tar --directory "${HOME}/.vim/" -oxvzf -


Requires : Vimball

This plugin ease code alignment. Install Align:

command wget "" \
command vim -c "so %" -c "q" "/tmp/Align.vba.gz"
command rm "/tmp/Align.vba.gz"

SQL Utilities

Requires : Align

SQL Utilities ease the creation of SQL queries. It provides a SQL query formatting feature. Install SQL Utilities:

command wget "" \
command unzip -qq -d "${HOME}/.vim" "/tmp/"
command rm "/tmp/"

This plugin features are available in “Plugin -> SQLUtil” menu.



Categories: Unix Shell


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.