The% < Variable Substitution Problem of VIM

  question, vim

图片描述

How do I replace% < with the file name. data?
图片描述
For example, replace the above %<.data with the following file name. data
图片描述

:call append(line(“.”), expand(‘%’) . ‘ and something append’)

%       current file name
 #       alternate file name
 #n      alternate file name n
 <cfile>     file name under the cursor
 <afile>     autocmd file name
 <abuf>      autocmd buffer number (as a String!  )
 <amatch>    autocmd matched name
 <sfile>     sourced script file name
 <slnum>     sourced script file line number
 <cword>     word under the cursor
 <cWORD>     WORD under the cursor
 <client>    the {clientid} of the last received
 message |server2client()|
 
 Modifiers:
 :p      expand to full path
 :h      head (last path component removed)
 :t      tail (last path component only)
 :r      root (one extension removed)
 :e      extension only