Skip to content

api.fs.rename_full #2148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alex-courtis opened this issue Apr 18, 2023 Discussed in #2145 · 1 comment · Fixed by #2461
Closed

api.fs.rename_full #2148

alex-courtis opened this issue Apr 18, 2023 Discussed in #2145 · 1 comment · Fixed by #2461
Labels
API API or Event PR please nvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciated

Comments

@alex-courtis
Copy link
Member

alex-courtis commented Apr 18, 2023

Discussed in #2145

Originally posted by mosheavni April 18, 2023
I migrated to the on_attach function, but I cannot seem to find full_rename as it was before!
I tried all of those:

  vim.keymap.set('n', 'r', api.fs.rename, opts 'Rename')
  vim.keymap.set('n', 'r', api.fs.rename_node, opts 'Rename node')
  vim.keymap.set('n', 'r', api.fs.rename_basename, opts 'Rename basename')
  vim.keymap.set('n', 'r', api.fs.rename_sub, opts 'Rename sub')

(of course each time a different line from here)
nothing gives me both the full dirname and the filename, it's always one of them.
Is this feature gone?

@alex-courtis alex-courtis added the API API or Event label Apr 18, 2023
@alex-courtis
Copy link
Member Author

full_rename has been migrated to api.fs.rename_sub

full_rename was changed at 949913f to rename sub.

Options:

  1. Add api.fs.rename_full
  2. Allow rename to take a user argument e.g. :p

1 is consistent.
2 is not be achievable as specific handling of each modifier is required

A generic rename with opts.mode could be added however that adds little.

@alex-courtis alex-courtis added the PR please nvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciated label Sep 2, 2023
b-charles added a commit to b-charles/nvim-tree.lua that referenced this issue Oct 9, 2023
b-charles added a commit to b-charles/nvim-tree.lua that referenced this issue Oct 9, 2023
alex-courtis added a commit to b-charles/nvim-tree.lua that referenced this issue Oct 15, 2023
alex-courtis added a commit that referenced this issue Oct 15, 2023
* feat(#2148): add rename_full in API

* feat(#2148): add default mapping 'u' for rename_full

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API or Event PR please nvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant