Skip to content

Instantly share code, notes, and snippets.

@nathan-cruz77
Last active August 29, 2015 14:20
Show Gist options
  • Save nathan-cruz77/26ca441f0b5b6dceb116 to your computer and use it in GitHub Desktop.
Save nathan-cruz77/26ca441f0b5b6dceb116 to your computer and use it in GitHub Desktop.
# Download Sublime Text x64 para linux
wget http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2%20x64.tar.bz2
# Extrai e move os arquivos do sublime para a pasta /opt
tar -xf Sublime\ Text\ 2.0.2\ x64.tar.bz2 -C /opt/
mv /opt/Sublime\ Text\ 2/ /opt/Sublime_Text
rm Sublime\ Text\ 2.0.2\ x64.tar.bz2
# Faz um link do programa em uma pasta que esta no PATH do sistema
# no nosso caso /usr/bin
ln -s /opt/Sublime_Text/sublime_text /usr/bin/sublime_text
# Cria e popula o arquivo para ser usado no ambiente grafico.
echo "[Desktop Entry]
Name=Sublime Text 2
GenericName=Sublime Text 2 # For KDE 4
Comment=Sublime Text 2
Exec=sublime_text
Terminal=false
Icon=/opt/Sublime_Text/Icon/128x128/sublime_text.png
Type=Application
StartupNotify=true
Categories=Development;IDE;Utility;TextEditor;" >> /usr/share/applications/sublime_text.desktop
# Faz o sublime o editor de arquivos de texto padrao, infelizmente nao esta funcionando,
# quando faco isso o aplicativo padrao para codigos fonte se torna o libreoffice writer, :(.
#sed -e 's/gedit.desktop/sublime_text.desktop/g' --in-place=.old /usr/share/applications/defaults.list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment