Renaming the current file in Vim

前端 未结 21 726
轻奢々
轻奢々 2021-01-29 17:15

How should I rename my current file in Vim?

For example:

  • I am editing person.html_erb_spec.rb
  • I would like it renamed to person
21条回答
  •  春和景丽
    2021-01-29 17:42

    For renaming existing file without using plugins you should use command

    :Explore
    

    This command allow you explore files in.directory, delete or rename them. than you should navigate to neccessary file in explorer than type R command which will allow you to rename file name

提交回复
热议问题