vim-autosave icon indicating copy to clipboard operation
vim-autosave copied to clipboard

How to disable the info message? (silent mode)

Open kgfly opened this issue 2 years ago • 7 comments

The plugin keep on prompting info message eg (blue)

image

How to disable it? The annoying thing is: if vim is in insert mode, it will exit the insert mode.

Thanks

kgfly avatar Apr 23 '23 05:04 kgfly

The message causes insert mode to stop?Am 23.04.2023 um 07:42 schrieb kgfly @.***>: The plugin keep on prompting info message eg (blue)

How to disable it? The annoying thing is: if vim is in insert mode, it will exist the insert mode.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

chrisbra avatar Apr 23 '23 08:04 chrisbra

Thanks. Actually, I meant: the insert mode will be paused for 1-3 seconds when the message is being showing.

Is it possible to disable to message? (or use some flag to disable the message)

kgfly avatar Apr 23 '23 17:04 kgfly

hm, there is a sleep here:

https://github.com/chrisbra/vim-autosave/blob/4ce9338e4798bc4451a9ce479ce7767aa2f8a54b/plugin/autosave.vim#L247-L255

but you shouldn't have hit this part, if there wasn't an error

chrisbra avatar Apr 24 '23 07:04 chrisbra

Thanks. The issue is actually very easy to repro.

I set a small value to the variable, etc let g:autosave_timer = 3*1000

Then the edit will be paused for 1 sec every 3 seconds. Is it possible to disable the message and do the saving in "async mode". So editor should not be freezed.

kgfly avatar Apr 24 '23 15:04 kgfly

I cannot reproduce this. Are you sure, you so not have an error and it runs into the Warning msg mentioned above?

chrisbra avatar Apr 25 '23 11:04 chrisbra

Can you please show :echo v:errmsg

chrisbra avatar Apr 25 '23 11:04 chrisbra

Thanks. The bug seems happened when editing a file whose size is close to autosave_backup_max_filesize

My setting is

let g:autosave_timer = 3*1000 let g:autosave_extensions = '.backup' let g:autosave_backup = expand('~/.vim/backup') let g:autosave_max_copies = 2 let g:autosave_backup_max_filesize = 1 * 1000 * 1000 let g:autosave_only_text = 1

The file size is:

image

First it shows the red string

image

Then ":echo v:errmsg" shows image

The file size is smaller that autosave_backup_max_filesize . But 2nd backup cannot be generated. So it shows red string and pause for the editor for 1 seconds.

kgfly avatar Apr 27 '23 14:04 kgfly