Monday, 21 November 2016

How to compile micro text editor on Termux on Android

Micro is a brilliant editor that is like an enhanced version of Nano. I'm really starting to enjoy coding in it. If you want to use it on Termux on Android, like I do then here's a quick walk through on how to comile it.



In Termux we are going to need a couple of packages before we get started; git and golang:

apt insall git golang

Then we need to set the Path in your shell of choice, so open Termux and open the rc file to your shell of choice. I'm using zsh and nano in this case, so this is the command I use:

nano ~/.zshrc

So now we need to set the GoLang path so when we compile the program this is where the binary file will go. Add this line to your .zshrc/.bashrc file:

export GOPATH=$HOME/go

Save and exit, you may need to exit or just source your shell with:

source ~/.zshrc

Now it's time go get the git repo and download it:

git clone https://github.com/zyedidia/micro

cd into the git cloned directory

cd micro

Now we need to compile the install by invoking the make command:

make

It may take a little time and appear to to nothing but it is. Once the command exits, enter the final command of

make install