Skip to content

Latest commit

 

History

History
49 lines (47 loc) · 1.54 KB

README.md

File metadata and controls

49 lines (47 loc) · 1.54 KB

VIM MySQL Suggestions

About

A plugin of VIM to show suggestions from MySQL database structure.

Demo

VIM MySQL Suggestions Autocomplete

Installation

Via Plugin Manager

Vundle

    Plugin 'borissov/vim-mysql-suggestions'

VIM Plug

    Plug 'borissov/vim-mysql-suggestions'

Manual Installation

cd ~/.vim/bundle
git clone git://github.com/borissov/vim-mysql-suggestions

Settings

In your vimrc file add options.

    " File Types you want to use suggestions
    autocmd FileType php setlocal completefunc=MySQLCompleteFunction
    autocmd FileType javascript setlocal completefunc=MySQLCompleteFunction
    " Be careful and don't publish in Github 
    let g:database_host = "MySQL Host"
    let g:database_password = "MySQL Password"
    let g:database_database = "MySQL Database Name"
    let g:database_user = "MySQL User"

Usage

Default mappings

The following key mappings are provided by default:

  • <C-x><C-u> Call user completion function
  • <C-x> Show completion menu

SuperTab optional integration

    let g:SuperTabDefaultCompletionType = "context"
    let g:SuperTabCompletionContexts = ['MySQLCompleteSuperTabContext']

Requirements

  • VIM 7.3+
  • PHP CLI 5+

Feedback

If you have any comments or questions about specific problems relating to this plugin, please do not hesitate to contact me. Tested on Vim, NeoVim, MacVim, gVim. Not support Windows versions.