diff options
Diffstat (limited to '')
| -rw-r--r-- | doc/tags | 1 | ||||
| -rw-r--r-- | plugin/vim-ai.vim | 17 |
2 files changed, 11 insertions, 7 deletions
@@ -1,4 +1,5 @@ :AI vim-ai.txt /*:AI* +:AIEdit vim-ai.txt /*:AIEdit* vim-ai vim-ai.txt /*vim-ai* vim-ai-about vim-ai.txt /*vim-ai-about* vim-ai-commands vim-ai.txt /*vim-ai-commands* diff --git a/plugin/vim-ai.vim b/plugin/vim-ai.vim index 1e9407f..6c473b1 100644 --- a/plugin/vim-ai.vim +++ b/plugin/vim-ai.vim @@ -1,7 +1,10 @@ let s:plugin_root = expand('<sfile>:p:h:h') let s:complete_py = s:plugin_root . "/py/complete.py" let s:chat_py = s:plugin_root . "/py/chat.py" -let s:debug = 0 + +if !exists('g:vim_ai_debug') + let g:vim_ai_debug = 0 +endif function! ScratchWindow() below new @@ -27,8 +30,8 @@ function! AIRun(...) range let prompt = lines endif - if s:debug - echo prompt + if g:vim_ai_debug + echo "Prompt:\n" . prompt . "\n" endif echo "Completing..." @@ -51,8 +54,8 @@ function! AIEditRun(...) range let buff_lastline = line('$') - if s:debug - echo prompt + if g:vim_ai_debug + echo "Prompt:\n" . prompt . "\n" endif echo "Editing..." @@ -99,8 +102,8 @@ function! AIChatRun(...) range endif endif - if s:debug - echo prompt + if g:vim_ai_debug + echo "Prompt:\n" . prompt . "\n" endif echo "Answering..." |