Rename before extension
Most of the time, when you rename a file, you don't want to change the extension, you just want to change the name of a file.
Therefore, it will be rather useful to add a new action, that will put the cursor directly before the file extension.
File browsers such as ranger or lf can be configured to have this feature (they also have the command prompt at the bottom as vim)
go for it :)
Any tips? I don't really know where to start, that's why opened an issue;)
go to the rename-file.lua and make a bit of an abstraction to rename either from filename or something else i suppose :)
Hm, I don't think it is possible with the current implementation of vim.ui.input as theit allows to provide default value and callback function, and there is really nowhere to move the cursor
hum this look weird indeed, could you maybe just remove the whole name and saving the extension, call input without the name, then pasting the extension ? Not sure how to achieve that exactly but i believe it should be possible.
I've created a PR for this, feedback welcome. I've created new action "relative_rename" that changes the base name of the file - without changing directory or extension. This is what I tend to want to do from nvimtree most of the time. I use another extension to move files.