✨ Focus Editor On File Creation
Is your feature request related to a problem? Please describe.
I think it would be nice if the user could start typing write away after launching an empty file, instead of having to click on the first line
Describe the solution you'd like
Typically when you launch a new empty file in most code editors, the cursor will automatically be focused on the first line allowing the user to start typing right away. At worst, the user may have to refocus the screen by clicking somewhere in the window. Currently, one has to click on the first line exactly.
Describe alternatives you've considered
N/A
Additional context
If this may be a bug or something irreproducible, we can just close this issue
Below, is a video of what I am seeing: https://streamable.com/a0cclr
Good catch @adsalad!
I'll try and get something working for this, PR will be linked back here if something works out.
I was thinking of maybe adding a becomeFirstResponder() to one of the UIKit text input views as a possible fix. One of CodeEditTextView or STTextViewController files seem like a good place to start. However, these files seem to be read-only.
@adsalad What is the status of this? Are you still planning on working on this?
This one was more difficult than I thought, I think someone else should take a crack at it.
For anyone planning on taking it on:
- Depending on the approach, you may need to import some of the TextView package(s) to edit the files handling input in the editor, such as CodeEditTextView.
Hi, as I mentioned on Discord, I'm taking a look at this issue now. As @adsalad mentioned, the solution might be within CodeEditTextView or even in STTextView.