Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Added a keybinding to rename the current buffer (updated) #1248

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

elliotaplant
Copy link

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

As per Atom issue #3212, there is a desire for a hotkey to rename/move the current file if the file has been saved outside the scope of the root dir and it is not visible in the tree view. A PR has already been submitted for this issue, but it had one outstanding change required and hasn't been updated in over a year.

This change adds the hotkey for the move command within the atom editor for darwin, windows, and linux systems.

Alternate Designs

No alternate designs were considered.

Benefits

The benefit of this change is that users will be able to rename/move files they are editing with a hotkey even if they can't find those files in their tree-view.

Possible Drawbacks

One possible drawback is if someone expected this hotkey to do nothing, they would be unpleasantly surprised to find that they are renaming their files with the keybinding alt-shift-m. This won't be a problem for people who have overridden this keybinding.

Applicable Issues

gitub.com/atom issue:
atom/atom#3212

currently open PR:
#549

@elliotaplant elliotaplant changed the title Add command for move Added a keybinding to rename the current buffer (updated) May 2, 2018
@lee-dohm
Copy link
Contributor

lee-dohm commented May 8, 2018

I don't think this achieves the stated goal of always renaming the current buffer since there is an option to prevent tree-view from always tracking the currently open buffer. This isn't going to be a simple change of adding a keybinding.

@elliotaplant
Copy link
Author

Good to know. Would it be worth warning the user if they tried to change a filename but tree-view wasn't tracking that file?

@lee-dohm
Copy link
Contributor

lee-dohm commented May 8, 2018

Not if the idea for the keybinding is to always affect the "current buffer".

@elliotaplant
Copy link
Author

Good point. This would require either always tracking the current buffer or removing the hotkey if that isn't possible.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants