Save file with new filename: append to existing filename

前端 未结 2 1142
甜味超标
甜味超标 2021-02-01 13:47

Is there a simple way to (in VIM) do save the currently open file with it\'s current name plus an appended phrase?

IE, from /home/affert/ type vim /

2条回答
  •  忘了有多久
    2021-02-01 14:12

    Easy:

     :w %_BACKUP
    

    If you need override:

     :w %_BACKUP!
    

    The it gonna answer:

    "filename_BACKUP!" [New] XL, XC written 
    

提交回复
热议问题