On Oct 12, 5:32 pm, Tim Chase <[email protected]> wrote:
> The subject more or less says it all, but using git and switching
> branches will change the timestamps on my files even though the
> underlying content doesn't seem to have changed.  I'd like to
> tell Vim that, for certain filespecs (likely via an autocmd), I
> don't want to see this message and that YES, I do want to always
> overwrite the file.
>
> Nothing that I found via a :helpgrep for that message suggested
> an apparent way to disable this.
>
> -tim

Yes, Vim can do it ;-)
Have a look at FileChangedShell autocommand. Here's part of my ~/.vim/
after/ftplugin/sh.vim that does what you need:

function! ProcessFileChangedShell()
        if v:fcs_reason == 'mode' || v:fcs_reason == 'time'
                let v:fcs_choice = ''
        else
                let v:fcs_choice = 'ask'
        endif
endfunction

autocmd FileChangedShell <buffer> call ProcessFileChangedShell()

-- 
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

Reply via email to