提交 f2e1a253 编写于 作者: C Cosmin Popescu

merge pull #19

......@@ -1138,6 +1138,8 @@ and
* `g:sw_log_to_file`: If true, then the logging of the communication between
`VIM` and `SQL Workbench/J` will be done in a file; otherwise, the logging
is done in memory
* `g:sw_sql_name_result_tab`: If enable, rename the result tab using @wbresult;
default value: 1
## Database explorer settings
......
......@@ -898,6 +898,9 @@ function! s:do_execute_sql(sql)
endfunction
function! s:add_title_to_sql(sql)
if g:sw_sql_name_result_tab != 1
return a:sql
endif
let _sql = a:sql
let title = substitute(a:sql, '\v[\n\r]', ' ', 'g')
if strlen(title) > 255
......@@ -914,6 +917,7 @@ function! sw#sqlwindow#execute_sql(sql)
return
endif
let _sql = s:add_title_to_sql(a:sql)
call s:do_execute_sql(_sql)
endfunction
......
......@@ -1190,6 +1190,8 @@ SQL BUFFER SETTINGS: *vim-sql-workbench-sql_buffer_settings
* `g:sw_log_to_file`: If true, then the logging of the communication between
`VIM` and will be done in a file; otherwise, the logging
is done in memory
* `g:sw_sql_name_result_tab`: If enable, rename the result tab using @wbresult;
default value: 1
--------------------------------------------------------------------------------
DATABASE EXPLORER SETTINGS *vim-sql-workbench-database_explorer_settings*
......
......@@ -149,6 +149,10 @@ if !exists('g:sw_autocomplete')
let g:sw_autocomplete = 1
endif
if !exists('g:sw_sql_name_result_tab')
let g:sw_sql_name_result_tab = 1
endif
"if !exists('g:sw_overwrite_current_command')
" let g:sw_overwrite_current_command = 0
"endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册