Sublime Text Installation, Debian with Plank

This is a guide showing how to install Sublime Text from the Sublime debian repo and then what to do to ensure you can pin it to Plank dock (could well be required for other docks like Docky too).
Install sublime from the repo (sublimes docs on install https://www.sublimetext.com/docs/3/linux_repositories.html)

I’m running a minimal system to had to install apt-transport-https as a prerequisite for the Sublime repo.

sudo apt install apt-transport-https

Get the sublime repo public key

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -

Create the repo in your /etc/apt/source.list.d directory

echo "deb https://download.sublimetext.com/ apt/dev/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text

Create a symbolic link to the sublime binary  called “sublime” in /usr/bin

sudo ln -s /opt/sublime_text/sublime_text /usr/bin/sublime

Edit the existing icon properties file for sublime (necessary to allow it to be pinned to the dock in Plank)

sublime /usr/share/applications/sublime_text.desktop

Update ‘Exec’ paths to be “sublime”.  Below is my finished /usr/share/applications/sublime_text.desktop file

[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=sublime %F
Terminal=false
MimeType=text/plain;
Icon=sublime-text
Categories=TextEditor;Development;
StartupNotify=true
Actions=Window;Document;

[Desktop Action Window]
Name=New Window
Exec=sublime -n
OnlyShowIn=Unity;

[Desktop Action Document]
Name=New File
Exec=sublime --command new_file
OnlyShowIn=Unity;

You should now be instantly able to ‘keep in dock’ in Plank when Sublime is running now.