Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Version 1.6

- Auto set the regular expression search to ignore case mode prior to initiating the chat (to make it case-insensitive no matter what settings the user has), then restore the case-sensitivity setting after the chat is over.
  • Loading branch information...
commit 7856cfc40cb99752cad2fe1b6dbbdc6214f606bf 1 parent aa84ed0
Michael Kamensky authored committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 plugin/VimChatBot.vim
View
7 plugin/VimChatBot.vim
@@ -1,5 +1,5 @@
" VimChatBot.vim : A self-teaching chat bot for Vim
-" Version : 1.5
+" Version : 1.6
" Maintainer : Michael Kamensky <stavdev@mail.ru>
" Last Modified : 10/14/2012
" License : This script is released under the Vim License.
@@ -43,7 +43,7 @@ nnoremap <unique> <silent> <Leader>Cb :call VCB_MainChatLoop()<CR>
" Script variables
let s:ChatIteration = 1
let s:MagicalContexts = 2
-let s:BotVersion = "1.5"
+let s:BotVersion = "1.6"
" Vi compatibility mode workaround
let s:GlobalCPO = &cpo
@@ -243,8 +243,10 @@ function! VCB_MainChatLoop()
let s:ChatIteration = 1
let more_status = &more
let cpo_status = &cpo
+ let case_status = &ignorecase
setlocal nomore
setlocal cpo&vim
+ setlocal ignorecase
echohl Comment
echo "Welcome to Agetian's ChatBot for Vim v" . s:BotVersion . "! Enjoy and have fun!\n"
echo "Type /Q to choose not to answer the bot's question or to end the conversation.\n"
@@ -273,6 +275,7 @@ function! VCB_MainChatLoop()
endwhile
let &more = more_status
let &cpo = cpo_status
+ let &ignorecase = case_status
endfunction
let &cpo = s:GlobalCPO
Please sign in to comment.
Something went wrong with that request. Please try again.