diff --git a/autoload/sw.vim b/autoload/sw.vim index b42282cb25b656feb713dc372961720ae95d8d45..d81ad7fa85d33900cee41242f2b356cc6dd9d91c 100644 --- a/autoload/sw.vim +++ b/autoload/sw.vim @@ -1,4 +1,3 @@ -"============================================================================" " " Vim SQL Workbench/J Implementation " @@ -15,7 +14,28 @@ " only dependency is SQL Workbench/J. Also includes powefull intellisense " autocomplete based on the current selected database " -"============================================================================" + +"" +" @section Introduction, intro +" This is an implementation of SQL Workbench/J in VIM. It works with any DBMS +" supported by `SQL Workbench/J` (PostgreSQL, Oracle, SQLite, MySQL, SQL +" Server etc.). See the complete list at +" http://www.sql-workbench.net/databases.html. +" +" Features: +" +" database explorer (e.g.: table lists, procedures list, views list, triggers +" list) +" extensible (you can have your own objects list) +" SQL buffer with performant autocomplete +" export any sql statement as `text`, `sqlinsert`, `sqlupdate`, +" `sqldeleteinsert`, `xml`, `ods`, `html`, `json` +" search in object source +" search in table or views data +" asynchronous (you can execute any command asynchronous) +" fully customizable +" +" if !exists('g:Sw_unique_id') let g:Sw_unique_id = 1 diff --git a/autoload/sw/autocomplete.vim b/autoload/sw/autocomplete.vim index 2b1fdfd03f88073a55a2f92cbb7ba2ed32ee4f01..0b4c339cc7bfb66c6d8d02c8fde8ee53a28439dd 100644 --- a/autoload/sw/autocomplete.vim +++ b/autoload/sw/autocomplete.vim @@ -342,7 +342,7 @@ function! sw#autocomplete#perform(findstart, base) " Otherwise, extract the current sql let sql = sw#autocomplete#extract_current_sql() " Check its type - call sw#session#set_buffer_variable('autocomplete_type', s:get_sql_type(sql)) + call sw#session#set_buffer_variable('autocomplete_type', s:get_sql_type(s:eliminate_sql_comments(sql))) " Desc type, easy peasy if (b:autocomplete_type == 'desc') return sw#autocomplete#all_objects(a:base)