Ask HN: Coding on Your Phone?
What are your solutions, if any, for editing code on your phone? I often have an idea on public transit that I usually have to jot done in a note but it would be useful to have a solution to edit code on the fly. I personally don't always use github/gitlab or other online repos, but tools using online repos suggestions are welcome.
38 comments
[ 3.0 ms ] story [ 73.5 ms ] threadNot sure how your remark of not using hosted git ties into a solution for coding on your phone. You mean using a web IDE? I guess that'd be possible also but then you need constant connectivity
Well,.then hormones and ADD took over and I can't still can't code worth crap. but I do like reading about it on HN, so thanks.
It (termux) is mildly annoying as you don't get to set your own username and you can't ssh into your phone (or maybe you can if you're on a rooted device.)
Also, there's no sixel support, so it's somewhat limited as a remote management platform.
But I've successfully scp'd remote files to local, then used emacs to modify the files and then scp them back. Git works fine, so you can clone, branch, commit and push if that's your workflow. Make and gcc all work fine, so you can compile other tools (prolog, scheme, node) if you need them.
Sbcl should work, but I ran into problems compiling I haven't yet resolved (not sure it isn't related to me monkeying around with local library links) so ymmv.
I know python is available via the package system, but I'm not a python person.
It IS definitely a terminal oriented experience. If you're looking for something like VSCode, this ain't it.
Lets you download GitHub repos to work offline and has common coding actions in a quick tap menu.
Also, I wrote a simple web page where I can run JavaScript or a Python-like language I created called Pith.
https://github.com/gabrielsroka/gabrielsroka.github.io/blob/...
However, it's not clear to me how to access a compiler or interpretor other than the Emacs Lisp interpretor. Termux won't install for some reason on my phone.
P.S. There are some BASIC ports for Android. Tiny fonts, barely readdable. Saving files in Android is like memory addressing on x86: interesting. /s
However, Vim’s design gives you maximum expressive power per key you press - and since pressing each key on an iOS keyboard is a bit inconvenient, this design philosophy ends up working really well on a soft keyboard. Moreover, most common actions can be done without special keys (i.e. arrow keys, ctrl/meta modifiers, etc.) which I usually find awkward to use on augmented mobile keyboards. With Vim, you can get quite far using just a standard iOS with an added Esc key (all of the apps I mentioned above adds an Esc key).
If you use Vim on desktop/laptop but haven’t tried it on iOS, I’d recommend giving it an hour of trial sometime, at least if you sometimes want to edit code on the go. (Personally, I rarely do that, but I like that I can.)
But did want to note, the AR/VR glasses space seems to be progressing[0], so perhaps with the correct peripherals for typing it might be possible to code in VR in transit in the not-too-distant future.
[0]https://www.xreal.com/air2
It's hard to move the cursor, hard to select text, hard to input special characters, hard to manipulate files, and so on.
Instead I use that time to annotate content with my Apple Pencil on my iPad. It feels like correcting paper documents, and keeps me more focused because I can't edit anything.
The experience was surprisingly decent. I'm quite new to coding and this was the most "batteries included and works out of the box" solution I could wrap my head around, didn't try to scam me into paying for a subpar experience and wasn't online.
https://www.gitpod.io/blog/software-development-from-my-andr...