codeapp icon indicating copy to clipboard operation
codeapp copied to clipboard

Editor doesn't support touch controls

Open James-lx opened this issue 3 years ago • 17 comments

It's hard to code using iPad virtual keyboard,and it doesn't support selecting using either hand or keyboard but sometimes it can do, I don't know why.

James-lx avatar Jun 29 '21 06:06 James-lx

Thank you for the message. This is a known issue from the very beginning. We use monaco-editor, which is the core editor from VS Code. While this gives us great performance, syntax highlighting and other features that VS Code users are familiar with, the editing experience without a hardware keyboard is poor.

I am attempting to patch monaco-editor to support touch controls, but it won't be easy. I am also considering to let users opting for an less powerful, but touch-friendly editor like CodeMirror 6.

bummoblizard avatar Jun 30 '21 06:06 bummoblizard

Thank you for your prompt reply Did you mean I can have better experience using hardware keyboard? But I can't use mouse(without keyboard)to select or others either.

James-lx avatar Jun 30 '21 09:06 James-lx

Yes. You can select text with mouse or trackpad in the latest build: https://testflight.apple.com/join/EgZ8sE2P

It will be released to the App Store in a few days.

bummoblizard avatar Jun 30 '21 09:06 bummoblizard

Currently Code is unusable with virtual keyboard due to selection not working.

CodeMirror 6 seems to support this fine. An entire replacement of Monaco or at least an option would be appreciated.

vwkd avatar May 20 '22 12:05 vwkd

Currently Code is unusable with virtual keyboard due to selection not working.

CodeMirror 6 seems to support this fine. An entire replacement of Monaco or at least an option would be appreciated.

Yes and I've thought about it. The issue is that CodeMirror doesn't provide many features that are tightly integrated to Code App and maintaining two sets of editor in one app seems troublesome. If you would like to see native controls and a more lightweight editor Runestone Editor does it really well (https://github.com/simonbs/Runestone).

I'm still open to this idea though.

bummoblizard avatar May 20 '22 22:05 bummoblizard

@benwu030 It's time to revisit this. Besides CodeMirror, Runestone is also a nice candidate for this: https://github.com/simonbs/Runestone. My plan is to support both Monaco Editor and the new editor. Now that we've completed the refactoring of the codebase this should not be too troublesome to implement.

We might need to give up certain feature like diff editors and searching though.

bummoblizard avatar Nov 27 '22 10:11 bummoblizard

I use diff and searching pretty frequently, and would not like this to be removed :(

luni-moon avatar Dec 01 '22 14:12 luni-moon

I use diff and searching pretty frequently, and would not like this to be removed :(

We will keep both editors :)

bummoblizard avatar Dec 10 '22 11:12 bummoblizard

I find this issue with text selection annoying too, and I would like to suggest adding something like in Online GDB. It uses the Ace editor (which I don't know if has the same issue as Monaco) but adds to the left column of line numbers the ability of folding and selecting multiple lines.

Select-text-with-column

redscorpse avatar Feb 05 '23 21:02 redscorpse

If you're able to patch monaco-editor to support touch, would you consider upsteaming it? This app is great, but I sometimes use VS Code in safari and on my windows tablet, and touch doesn’t work there either. Fixing that would be incredible.

jbschooley avatar Apr 09 '23 20:04 jbschooley

Hi @bummoblizard , new user to Code app, very good by the way, any updates on the second editor for better touchscreen support that you mentioned last year?

SRUKen avatar Dec 10 '23 03:12 SRUKen

In the latest TestFlight build, you might enable Runestone Editor under the experimental settings section for touch control support.

bummoblizard avatar Apr 29 '24 08:04 bummoblizard

To bad the TestFlight beta is full. 😕

D1reW0lf avatar Apr 29 '24 08:04 D1reW0lf

@D1reW0lf I just opened up more slots :)

bummoblizard avatar Apr 29 '24 09:04 bummoblizard

@D1reW0lf I just opened up more slots :)

Thank you so much!! 🖤 Will it, eventually, “color code” with Runestone?

D1reW0lf avatar Apr 29 '24 10:04 D1reW0lf

Currently there is syntax highlighting for C, C++, JS and Python.

bummoblizard avatar Apr 29 '24 13:04 bummoblizard

Currently there is syntax highlighting for C, C++, JS and Python.

That explains why I didn’t see it (I was testing with html, php, .env files, json). Thank you for letting me know.

D1reW0lf avatar Apr 29 '24 18:04 D1reW0lf