How should I rename my current file in Vim?
For example:
person.html_erb_spec.rb
person
:!mv % %:h/new_name
Register % contains the name of the current file.'%:h'shows the directory 'head' containing the current file, e.g.: %:hreturns /abc/def when your file full path is abc/def/my.txt
%
'%:h'
%:h
/abc/def
abc/def/my.txt