-
Create a folder called
~scripts
in your home directory. -
In the directory create a file called
ix
. -
Add the following script to the file
#!/bin/bash
if [ -n "$1" ]; then
curl "ix.io/$1" 2>/dev/null
exit 0
fi
curl -F 'f:1=<-' ix.io 2>/dev/null
-
Then run
chmod +x ix
. -
Add
export PATH=$PATH:~/scripts
to your~/.bashrc
or~/.zshrc
. -
Run
source ~/.bashrc
orsource ~/.zshrc
. -
Test that the
ix
command works by runningecho "abc" | ix
, it should return a ix.io url. -
Open up vim and position on top of the paragraph that you want paste online press
!}
to select the code to ix'ed. -
Type
ix
in the bottom where it looks like:.,.+4!
, this should return the ix.io url of the formhttp://ix.io/abcd
. -
Share the url with others.