& Nbsp; vim is my favorite editor and can't write emails without it. Therefore, I have been using the combination of Thunderbird2.0 + ExternalEditor + vim to write emails. Recently, Google's Japanese input method has been installed. Unfortunately, it is not compatible with vim, and it often causes vim to exit abnormally during Chinese character conversion.
Vim is my favorite Editor that can't even write emails. Therefore, I have been using the combination of Thunderbird 2.0 + External Editor plug-in + vim to write emails. Recently, Google's Japanese input method has been installed, but its compatibility with vim is not very good. it often causes vim to exit abnormally when the Chinese character is changed, and half of the emails it writes will become a bubble. So I thought it would be nice if vim could be automatically saved. After studying the help file today, we found that the function similar to automatic storage can be realized.
The method is simple. you only need to add the following line to $ VIM/vimfiles/ftplugin/mail. vim:
Au InsertLeave *. eml write indicates that the write command is automatically executed when the edit mode (InsertLeave) is exited for all. eml files. In this way, it is automatically saved every time you press Esc.
By the way, paste other useful configurations:
Set encoding = utf8
Set guifont = MS _ 0000000000000000: h10: cSHIFTJIS
Set tw = 140 "140 character automatic line feed
Set et "expandtab, replacing the Tab key with spaces
Retab "convert all existing tabs into spaces when vim is opened
Au InsertLeave *. eml write "is automatically saved every time you exit insert mode.