Fix #734 add smartcase and ignorecase options
Change overwrite context behavior