Step 1 Create the script
vi vim-on-heroku.sh
'#!/usr/bin/env bash
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin
Step 2 Send file to Heroku
git add .
git commit -m "add VIM"
In Heroku
? heroku run bash
? . vim-on-heroku.sh
Reference:
https://gist.github.com/sfate/2889158#file-vim-on-heroku-sh