Mercurial > vim_plugins > dbtables
comparison plugin/dbtables.vim @ 1:8530ebeda72c
Adding actual db tables implementation from original script.
| author | Luka Sitas <lsitas@avatarasoftware.com> |
|---|---|
| date | Wed, 11 Mar 2026 08:53:55 -0400 |
| parents | 238b45cc333b |
| children | c19add1b66a9 |
comparison
equal
deleted
inserted
replaced
| 0:238b45cc333b | 1:8530ebeda72c |
|---|---|
| 4 if exists('g:loaded_dbtables') | 4 if exists('g:loaded_dbtables') |
| 5 finish | 5 finish |
| 6 endif | 6 endif |
| 7 let g:loaded_dbtables = 1 | 7 let g:loaded_dbtables = 1 |
| 8 | 8 |
| 9 " Default configuration option | 9 " Config default values |
| 10 if !exists('g:dbtables_greeting') | 10 let g:snippets_directory = get(g:, 'snippets_directory', |
| 11 let g:dbtables_greeting = 'Hello from dbtables!' | 11 \ expand('$HOME/.config/heidisql/Snippets')) |
| 12 endif | 12 let g:db_user = get(g:, 'db_user', '') |
| 13 let g:db_password = get(g:, 'db_password', '') | |
| 14 let g:db_name = get(g:, 'db_name', '') | |
| 15 let g:db_host = get(g:, 'db_host', '') | |
| 13 | 16 |
| 14 " Command that calls an autoloaded function | 17 "============================================= |
| 15 command! DbtablesGreet call dbtables#greet() | 18 " Key Bindings |
| 19 "============================================= | |
| 20 | |
| 21 " Keybinding to open query history | |
| 22 command! DBTables call dbtables#OpenDBTablesWindow() | |
| 23 command! DBConsole call dbtables#DBConsole() | |
| 24 command! ExecuteSQL call dbtables#ExecuteSQLQuery() | |
| 25 command! QueryHistory call dbtables#OpenQueryHistory() | |
| 26 command! QuerySnippets call dbtables#OpenQuerySnippets() | |
| 27 | |
| 28 " Function to open the database tables window | |
| 29 nnoremap <Leader>dt :DBTables<CR> | |
| 30 | |
| 31 nnoremap <Leader>eq :ExecuteSQL<CR> | |
| 32 xnoremap <silent> <Leader>ev :call dbtables#ExecuteVisualSQLQuery()<CR> | |
| 33 | |
| 34 nnoremap <Leader>db :call DBConsole<CR> | |
| 35 nnoremap <Leader>qh :call QueryHistory<CR> | |
| 36 nnoremap <Leader>qs :call QuerySnippets<CR> |
