A plugin of VIM to show suggestions from MySQL database structure.
Via Plugin Manager
Plugin 'borissov/vim-mysql-suggestions'
Plug 'borissov/vim-mysql-suggestions'
cd ~/.vim/bundle
git clone git://github.com/borissov/vim-mysql-suggestions
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"
The following key mappings are provided by default:
<C-x><C-u>
Call user completion function<C-x>
Show completion menu
let g:SuperTabDefaultCompletionType = "context"
let g:SuperTabCompletionContexts = ['MySQLCompleteSuperTabContext']
VIM 7.3+
PHP CLI 5+
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.