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
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)os.Create()
n
ingui/core.go
*Node
and current*tview.TreeView
's tree