> Hi,
>
> I want to disable warning message W12. Does anybody know what command
> to use for disabling it?
I don't know of any command that simply disables it. How you might
avoid it depends on what is causing it to appear. You might take a
look at
:help FileChangedShell
or even
:helpgrep FileChangedShell
to find some strategies for avoiding similar messages.
For editing files maintained by Perforce, I use the following
function, which I adopted from a function I wrote when I used
ClearCase, which came from something posted on this list. I've
forgotten how parts of it work and there is probably a better method
available now, but this works for me for the case of changing the
file on disk by checking it out of a version control system.
function! s:P4Edit()
checktime
exe "au FileChangedShell" expand("%") "let &cpo = &cpo"
let mtime = strftime("%Y%m%d%H%M.%S", getftime(expand("%")))
let l:msg = system('2>&1 p4 edit '.expand('%'))
if v:shell_error == 0 && filewritable(expand("%"))
" The 'edit' succeeded.
set noro
exe "silent !touch -t" mtime "%"
endif
checktime
exe "au! FileChangedShell" expand("%")
echo l:msg
endfunction
HTH,
Gary
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment