Closed rqdmap closed 11 months ago
Good stuff!
But I think the name is a bit confusing.
It might be a better idea to swap the functionality of rename_append
and rename_append_ext
.
And maybe renaming it to rename_prepend_ext
rename_append
puts cursor to the end of file (appending to the file)
rename_prepend_ext
puts cursor right before extension (prepending to the extension)
AKA
rename_append -> rename_prepend_ext
rename_append_ext -> rename_append
Kind of scope creep, but what do you think?
I mostly agree with you about these confusing names. It seems better to let rename_append
act like the previous rename_append_ext
.
But I want to reserve the ability to directly append to the file name without touching the extension. This functionality is quite frequently used I think. So I want to reserve it by naming it more reasonably. I did some research and found some naming methods for describing filename without extension:
Filename - Wikipedia calls it base name
or stem
Many file systems, including FAT, NTFS, and VMS systems, consider as filename extension the part of the file name that consists of one or more characters following the last period in the filename, dividing the filename into two parts: a base name or stem and an extension or suffix used by some applications to indicate the file type.
Vim calls it file root
(:help filename-modifiers).
I'm not sure which one is better(unambiguous and clear). I prefer rename_append_base
because it seems simple and intuitive.
To sum up:
rename_append
puts cursor to the end of file;
rename_append_base
puts cursor to the end of the base name of file
It looks good; What do you think of the new naming method?
rename_append_base
is good for me :+1:
This command renames a file with the cursor set to the end of the file name.