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

version 7.1.1

上级 bf089b0d
......@@ -11,7 +11,7 @@ it, here is the quick start:
*Running sql queries against a DBMS*:
* set the `g:sw_config_dir` and `g:sw_exe` variables
* set the `g:sw_config_dir`, `g:sw_exe` and `g:sw_cache` variables
* open your sql buffer
* if you have `CtrlP` installed you can do `CtrlP` and then select `SQL
Workbench profiles` and choose your profile
......@@ -1127,8 +1127,8 @@ and
which means open with vim `edit` command
* `g:sw_tab_switches_between_bottom_panels`: if set to true, then clicking tab
in a db explorer will switch between the bottom panels
* `g:sw_autocomplete_cache_dir`: the location where the autocomplete
information is saved. You'll need to set it on Windows to work.
* `g:sw_cache`: the location where the cached data is going to be saved
(autocomplete data, profiles data etc.)
* `g:sw_switch_to_results_tab`: If true, then switch to the results buffer
after executting a query
* `g:sw_highlight_resultsets`: If true, highlight the resultsets headers
......
......@@ -695,7 +695,7 @@ endfunction
function! sw#autocomplete#complete_cache_name(ArgLead, CmdLine, CursorPos)
let words = split('^' . a:CmdLine, '\v\s+')
let files = split(globpath(g:sw_autocomplete_cache_dir, '*'), "\n")
let files = split(globpath(g:sw_cache, '*'), "\n")
let result = []
for file in files
let f = substitute(file, '\v\c^.*\/([^\/\.]+)\.?.*$', '\1', 'g')
......
function! s:get_name()
return g:sw_autocomplete_cache_dir . '/' . 'profiles.vim'
return g:sw_cache . '/' . 'profiles.vim'
endfunction
function! sw#profiles#update(channel)
......@@ -25,6 +25,9 @@ function! sw#profiles#about(profile, txt)
endfunction
function! sw#profiles#finish(profile, txt)
if !(a:txt =~ 'XSLT transformation.*finished successfully')
call sw#display_error("There was a problem fetching the profiles for Sql Workbench (maybe the g:sw_cache) variable is not set?")
endif
endfunction
function! sw#profiles#get()
......
......@@ -15,7 +15,7 @@ function! sw#report#get(profile)
endfunction
function! s:get_name(profile)
return g:sw_autocomplete_cache_dir . '/' . substitute(a:profile, '\v\', '-', 'g')
return g:sw_cache . '/' . substitute(a:profile, '\v\', '-', 'g')
endfunction
function! s:get_report(profile)
......
......@@ -30,7 +30,7 @@ it, here is the quick start:
Running sql queries against a DBMS:
* set the `g:sw_config_dir` and `g:sw_exe` variables
* set the `g:sw_config_dir`, `g:sw_exe` and `g:sw_cache` variables
* open your sql buffer
* if you have `CtrlP` installed you can do `CtrlP` and then select and choose your profile
* otherwise, you can do `:SWSqlBufferConnect` and then in the buffer execute
......@@ -1179,8 +1179,8 @@ SQL BUFFER SETTINGS: *vim-sql-workbench-sql_buffer_settings
which means open with vim `edit` command
* `g:sw_tab_switches_between_bottom_panels`: if set to true, then clicking tab
in a db explorer will switch between the bottom panels
* `g:sw_autocomplete_cache_dir`: the location where the autocomplete
information is saved. You'll need to set it on Windows to work.
* `g:sw_cache`: the location where the cached data is going to be saved
(autocomplete data, profiles data etc.)
* `g:sw_switch_to_results_tab`: If true, then switch to the results buffer
after executting a query
* `g:sw_highlight_resultsets`: If true, highlight the resultsets headers
......@@ -1213,4 +1213,3 @@ GENERAL SETTINGS: *vim-sql-workbench-general_settings
use `SWSqlWipeoutResultsSets` command.
* `g:sw_config_dir`: the config dir of the (works only with
build 121.4 and more)
......@@ -65,8 +65,8 @@ if !exists('g:sw_search_default_compare_types')
let g:sw_search_default_compare_types = 'contains'
endif
if !exists('g:sw_autocomplete_cache_dir')
let g:sw_autocomplete_cache_dir = $HOME . '/.cache/sw'
if !exists('g:cache')
let g:sw_cache = $HOME . '/.cache/sw'
endif
if (!exists('g:sw_delimiter'))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册