Sublime Text Preferences

Sublime Text has released a new Beta for version 3. This means i need to migrate my sublime personal preference. This post will help me copy and paste this on different workstation. The one listed are the only one i use.

{
    // instead of prompting, always reload changed files on disk.
	"autoReloadChanged": true,
    // colorscheme of choice
	"color_scheme": "Packages/Color Scheme - Default/Pastels on Dark.tmTheme",
    // my favorite coding font
	"font_face": "Inconsolata",
	"font_size": 14,

    // always know what tabs are not saved yet
	"highlight_modified_tabs": true,
	"open_files_in_new_window": false,

    // prefered tabs configuration
	"tab_size": 4,
	"translate_tabs_to_spaces": true,
	"useTabStops": true,

    // annoying wordwrap remove
	"wordWrap": false,

    // Characters that are considered to separate words
	"word_separators": "./\()"'-:,.;<>~!@#%^&*|+=[]{}`~?"
}

Remote editing with Sublime Text and sshfs

I was allocated to a big new project and i am required to edit my codes remotely. I’ve always finished a project or two using VIM on remote servers but now i would like to change my old habits and write codes with sublime. This guide will teach you how to use your Linux machine and Sublime Text  to edit your codes remotely.

sshfs (SSH Filesystem)

sshfs mounts and help you edit directories and files on your remote server.

1. First you  need to install sshfs

On Debian, Ubuntu  or Linux Mint

sudo apt-get install sshfs

On RHEL / CentOS

# yum install fuse-sshfs

2. Mount your remote folder to your local directory

 # mkdir -p /mnt/ssh # sshfs kalmario@10.28.5.121:/data/project_folder/ /mnt/ssh/ 

3. Open your Sublime and open directory /mnt/ssh

 

Disclaimer: This method is working great on me because my remote server is just a build away. I’ll try it on a rackspace server which is a continent away from me and post if the lag time is still manageable and not irritating.

Sublime 2 Useful tips and Resources

Learn your sublime shortcuts

https://www.shortcutfoo.com/app/tutorial/sublimetext

Tips for beginners

http://blog.alainmeier.com/post/27255145114/some-things-beginners-might-not-know-about-sublime-text

Zen-Coding

plugin for high-speed HTML, XML, XSL (or any other structured code format) coding and editing
http://code.google.com/p/zen-coding/

Lorem Ipsum Generator

https://github.com/mrmartineau/Placeholders

Git

https://github.com/kemayo/sublime-text-2-git

Sublime Api Reference

http://www.sublimetext.com/docs/2/api_reference.html

Installing Sublime Text 2 on Linux Mint 12 or Ubuntu

I have been using sublime text along side with vim for a while now and so far this is my Notepad++ replacement. This editor is fast, light weight, very customizable and really slick looking. the license costs 59 USD but an evaluation version can be downloaded for free, however a pop-up will show every some number of save.

I have defined my shortcuts just the same as Notepad++, this helped me migrate to sublime much easier. When you enter “Vintage mode” your editor will become VIM.

The Pane on the right side is effective when searching text because the text will be enclosed on a oblong and will be visible in the code overview Pane.

Installing Sublime

 

Download the version 2.0.1. Note: you can get the latest version’s downlink link at http://www.sublimetext.com/2

 wget "http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1.tar.bz2"

 

Extract the version 2.0.1

 tar -jxvf Sublime Text 2.0.1.tar.bz2

 

Add to your $PATH variable

adding to your $PATH means you can launch sublime using “sublime_text” command on your terminal or launcher. Be sure to add restart your bash profile by restarting or logging out and loggin on your desktop/laptop.
echo "export PATH=$PATH:`pwd`" >> ~/.bash_profile