The Ctrlp extension allows you to type the path of a file and press Ctrl+Y to create it if it doesn't exist. This is a super handy feature, as it lets the user create new files without taking their hands off the keyboard.
Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.
Check #1839 which was merged some days ago. It's more "vim style".
@Kxze I'm currently working on increased explorer functionality as @tarciozemel pointed out with #1839 and also in #2115 the next PR i'll be adding will be using probably e binding to add a new file in the explorer, the idea being you move to the selected folder where you want the file using h,j,k,l then hit e to get an input where you'd type in the file name to create a new file (and have this be undoable with u)
@Akin909 I have a suggestion, when cursor over a file in a particular folder o, opens the dialog to create a new file as well, has the same semantic idea of a new line on vim.
@badosu #2130 adds the ability to press <c-e> (e seemed too easy to hit by accident, but can easily be rebound) over a file or folder and if a folder is selected the the new file or folder is created within it so I think if i'm understanding it right it should already do what you're suggesting? (although the binding is different)
Is there anything pending with this issue? A lot of ideas were thrown around but all the referenced pull requests have been merged in so this issue feels "done" to me.
I'm just going to close this issue and see if anyone complains. :stuck_out_tongue:
What was merged and referenced was sidebar explorer code. If I understand OP correctly he wants to be able to press <Ctrl+Shift+P>, type something like "New file" and be able to create new file that way. I think it's quite different from sidebar explorer user experience.
Yes, the question is whether this functionality is necessary given the
explorer functionality.
Em Sex, 25 de mai de 2018 16:36, Daniel Kosiński notifications@github.com
escreveu:
What was merged and referenced was sidebar explorer code. If I understand
OP correctly he wants to be able to press, type something
like "New file" and be able to create new file that way. I think it's quite
different from sidebar explorer functionality.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/onivim/oni/issues/2129#issuecomment-392159364, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAVNoORSuSGFq3IFZ6xjCIAEBCGGc5suks5t2F1LgaJpZM4Teeit
.
For what it's worth, @Akin909 described his alternative solution using the explorer and the OP responded with hooray emoji so I assumed it was an acceptable alternative. I guess there's just a question of whether we want to implement a feature as originally described or if we just want to make an OP happy. :slightly_smiling_face:
I love the new explorer functionality but personally I still think the originally asked feature would be desirable, considering it's something many Vim/Neovim users have already adapted into their workflow. I'm personally fine with either, it's just a matter of whether there's demand for the Ctrl + P menu in my opinion.
OP has spoken! Re-opening.
In neovim a user can create a new file by using the command line :e new.txt or a host of dozens of other alternatives including :vsp newThing.js or :sp otherThing etc. whilst I think oni tutorials could surface this, an implementation of this feature is essentially going to be registering a command that does this behind the scenes, which I personally think is duplicating existing but perhaps less readily accessible functionality
I agree with @Akin909, IMO there's a limit on how much we want to hold the hand of the user.
Having this would be contraproductive IMO with regard to using existing functionality, however if someone want to add an entry to Ctrl+Shift+P I would not be against it.
I just think this would be unnecessary complexity, will you always create a file in the root folder, if not how to specify, etc...?
Most helpful comment
@Kxze I'm currently working on increased explorer functionality as @tarciozemel pointed out with #1839 and also in #2115 the next PR i'll be adding will be using probably
ebinding to add a new file in the explorer, the idea being you move to the selected folder where you want the file usingh,j,k,lthen hiteto get an input where you'd type in the file name to create a new file (and have this be undoable withu)