Search code examples
vimvi

Renaming the current file in Vim


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.haml_spec.rb
  • I would like to continue editing person.haml_spec.rb

How would I go about doing this, elegantly?


Solution

  • There's a little plugin that lets you do this.