In my article on setting up a development environment on Android devices, I showed how you can install and configure Neovim, Emacs, and Visual Studio Code onto the device. In this article, I am going to walk through how to use VS Code and Neovim to perform remote code development.
Remote Code Development
For both VS Code and Neovim remote code development, the SSH server must be running on the remote machine. Since I have already set up OpenSSH in the previous article, I will not go through the steps here again.
Prerequisite for Visual Studio Code
VS Code Remote SSH only supports glibc based Linux distributions. Since we are using Termux on Android devices, there is an additional step for us to set up Ubuntu in Termux.
Once I get the Ubuntu prompt, I need to install OpenSSH for the Ubuntu instance.
root@localhost:~# apt-get updateroot@localhost:~# apt-get install openssh-server
Install dependant libraries required by VS Code.
root@localhost:~# apt-get install build-essential -y
Add the following line to /etc/ssh/sshd_config to allow root login.
Start sshd listening on port 8023.
root@localhost:/# mkdir -p /run/sshdroot@localhost:/# /sbin/sshd -p 8023
Change the password for root.
Visual Studio Code
I am going to use Visual Studio Code Remote Development which allows us to use a container, remote machine, or the Windows Subsystem for Linux (WSL) as a full-featured development environment.
From within VS Code, press
Command P for macOS) type
ext install ms-vscode-remote.remote-sshto install the Remote SSH extension
ext install ms-vscode-remote.remote-ssh-editto install the additional extensions for syntax colorization, keyword IntelliSense, and simple snippets when editing SSH configuration files.