Hacker News new | ask | show | jobs
by o1y32 1012 days ago
Great! I have been wondering why something like this did not already exist, given that you can already run a full Ubuntu from termux (and indeed people have run a coder-server from such an environment). Someone must be able to create a more user-friendly version of vscode on Android. Will try this out on my Samsung tablet.

My only concern is the memory management -- vscode (and its extensions) is not super friendly in its memory usage, and on a phone/tablet the RAM could easily run out, even if swap is enabled.

4 comments

I've been using termux + neovim as my default text editor on my phone. And it is surprisingly comfortable even with a touch screen keyboard.
Agreed! Termux profoundly changed my life. I do all of my programming inside Termux now. I find it to be pretty comfortable too.

Only thing I'm still missing is a way to build Android applications from inside Termux. We can write software for normal computers from inside themselves. Conversely, phones have always been these consumer machines, only running software produced for them and with no ability to program themselves. Feels like it's the only remaining barrier in the way of Android phones becoming truly general purpose computers.

I opened an issue on their repository about packaging the Android development tools:

https://github.com/termux/termux-packages/issues/17701

Someone linked a discussion where someone got it to work. I haven't had any luck setting this up though.

You can do that with Godot, I think - have a look.
Does it come with a modal keyboard or the same static one?
Android allows you to swap the virtual keyboard. I use unexpected keyboard which is also free software. It's excellent for programming. Before that I used Hacker's Keyboard which has actual arrow keys.

Termux also has a configurable bar at the bottom where you can map any keys you want. I use it for function and arrow keys plus a bunch of common symbols.

Here's an example from my dotfiles:

https://github.com/matheusmoreira/.files/blob/38565320fefb92...

Not sure what you mean by modal keyboard, but there is fully customizable row of keys in termux.

I disabled it, because I use special android keyboard app[0] with a custom layout made from scratch[1]: all common symbols, arrows, esc, ctrl, alt, forward delete, paste and enter gestures etc. etc.

[0] - https://jbak2.ucoz.net/ (yes it's horrible website, but it's free and easy to maintain for the handicapped developer)

[1] - https://github.com/Archargelod/jbak2Templates-Skins

Well, the modal command system is sort of hacked onto the qwerty keyboard. Surely it'd be more natural to just "insert" directly rather than hitting "i".
It's the same static keyboard, but navigation is easier as you can swipe to navigate around.
Modern phones come with 8GB of RAM, if you close a bunch of background apps it should deal with VS Code just fine.

I wouldn't even try it on a budget device, but high end Androids should run this more than well enough.

Do you have guide on hand about enabling swap on Android devices?

I searched a bit but saw some conflicting info and most of it was quite old. It seemed like people don't recommend doing it is possible.

Samsung has it built-in under "Memory" - "RAM Plus", so it could be a ROM thing.
So I found this app which seems like it's supposed to create more swap but the review seem mixed. I wonder if it depends on which version of Android. Seems Samsung has this feature built in to their OS at some point.

https://play.google.com/store/apps/details?id=com.allakore.s...

When we run Ubuntu on Android, we prefer UserLAnd over termux :)
I've been a happy UserLAnd user for a long time and it's a wonderful project, thank you!

I've have recently started using vmConsole too (which is based on qemu instead) as I needed docker. Also great.