Hacker News new | ask | show | jobs
by ja3k 1335 days ago
I've been programming on my phone with termux + vim. It's been sort of a delight.
3 comments

In case you want the same Termux experience but also the huge nix packages collection - check out https://github.com/t184256/nix-on-droid
>> I've been programming on my phone with termux + vim. It's been sort of a delight.

Seconded.

With Termux (https://termux.dev/en/) I have C, C++, Rust, Go, Perl, Python, Ruby, and more in my pocket.

The screen is small, but the tools are mostly the same you would find on your favorite *nix box.

No network connection needed beyond getting the packages you want installed.

The thought of using vim on a phone gives me mild anxiety but I'll definitely check termux!
I've found the phone's small keyboard makes a lot of the silly vim shortcuts I've learned over time actually worth it.
Vim comes from a time when we did not have screens, you had to print out the code on paper. Probably why it works surprisingly well on mobile. Being able to see the code is a luxury. Typing speed is also not an issue when writing a program, although modern languages are verbose compared to assembly. I would worry about ergonomics when working on mobile though, like neck/back and thumb issues. I would suggest having the terminal screen built into glasses, and a wireless keyboard for input. Maybe we can innovate on the keyboard part so it can fit in your pocket
It works quite well. There is a lack of precision trying to drag the cursor around on Android, which is made worse on the <$100 quality devices. Using vim's keyboard commands, I can precisely edit text far easier than anything else I have used on a phone. I never used emacs because I'm not a fan of chords, and this is amplified on the phone. However, people who swipe text may like emacs chords over vim's commands and modes.
>> The thought of using vim on a phone gives me mild anxiety but I'll definitely check termux!

termux also has emacs, nano, and a few other text editors.

I know I know that's why I'm giving it a shot :)