I thought about it, to do something good,
1, first of all like it's the most motive to understand it
2, hearsay about that thing, will go to understand and go to play a turn
3, interest needs to be cultivated
One add VIM header information.
System: C67
Append the following code to/ETC/VIMRC.
Map <F4>: Call Titledet () <cr>'sfunctionaddtitle () call Append (0,"/*=============================================================================") Call Append (1,"#") Call Append (2,"# author:lanny-[email protected]") Call Append (3,"#") Call Append (4,"# qq:781647046") Call Append (5,"#") Call Append (6,"# Last modified:". Strftime ("%y-%m-%d%h:%m")) Call Append (7,"#") Call Append (8,"# Filename:". Expand ("%:t")) Call Append (9,"#") Call Append (Ten,"# Description:") Call Append ( One,"#") Call Append ( A,"=============================================================================*/") Echohl warningmsg|Echo "successful in adding the copyright."|Echohl noneendffunctionupdatetitle () normal m'Execute'/# *last modified:/[email protected]:.*[email protected]\=strftime (": \t%y-%m-%d%h:%m") @'Normal"'Normal Mk Execute'/# *filename:/[email protected]:.*[email protected]\= ": \t\t". Expand ("%:t") @'Execute"Noh"Normal'kEchohl warningmsg |Echo "successful in updating the copy right."|Echohl noneendfunctionfunctionTitledet () Let n=1 whileN <Ten Let Line=getline (n)ifLine =~'^\#\s*\s*last\smodified:\s*.*$'Call Updatetitle () return endif let n= n +1Endwhile Call AddTitle () endfunction
Vim automatically adds annotations