Skip to content
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

implement create new file shortcut n #2

Closed
ozansz opened this issue Jul 22, 2022 · 2 comments
Closed

implement create new file shortcut n #2

ozansz opened this issue Jul 22, 2022 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers ui

Comments

@ozansz
Copy link
Owner

ozansz commented Jul 22, 2022

Feature Request Summary

The key press event for n should create a new empty file on the current directory. The current directory is the parent directory of the file that's currently selected (on hover) or the same one if the hover is on a directory. The new file's name should be taken from the user by a modal (a simple form modal would be fine)

  • File creation can be simply done by using os.Create()
  • It would be ideal if the file is created with the same permissions as the parent directory
  • Add handler for key press event n in gui/core.go
  • The handler should also add the created file as a node to the root *Node and current *tview.TreeView's tree
@ozansz ozansz added enhancement New feature or request good first issue Good for newcomers ui labels Jul 22, 2022
@gozeloglu
Copy link
Contributor

I am working on this feature.

gozeloglu pushed a commit to gozeloglu/gls that referenced this issue Jul 23, 2022
* Related to ozansz#2.

Signed-off-by: Gökhan Özeloğlu <[email protected]>
@gozeloglu
Copy link
Contributor

gozeloglu commented Sep 1, 2022

This issue can be closed @ozansz.

@ozansz ozansz closed this as completed Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers ui
Projects
None yet
Development

No branches or pull requests

2 participants