How do I rename an open file in Emacs?

后端 未结 11 1851
别跟我提以往
别跟我提以往 2020-12-07 07:03

Is there a way to rename an open file in Emacs? While I\'m viewing it? Something like save-as, but the original one should go away.

11条回答
  •  甜味超标
    2020-12-07 07:36

    There is a way very easy, you press the command M-x and than type vc-rename-file, after that you just need to select your current file at the directory, and than choose the new name. The buff that has the changed file will be refreshed.

    Source:https://www.gnu.org/software/emacs/manual/html_node/emacs/VC-Delete_002fRename.html

提交回复
热议问题