background preloader

Sublime Text 2 Tips and Tricks (Updated)

Sublime Text 2 Tips and Tricks (Updated)
Sublime Text 2 is one of the fastest and most incredible code editors to be released in a long time! With a community and plugin ecosystem as passionate as this one, it just might be impossible for any other editor to catch up. I'll show you my favorite tips and tricks today. Sublime Text 2 is currently available for all major platforms: OS X, Linux and Windows. 1 - Bleeding Edge Versions Sublime is in active development. Download a dev build of Sublime 2 here. 2 - Get a Better Icon Update: here is a better icon. In its defense, Sublime Text 2 is still in a beta state. To integrate it, you need to replace the existing "Sublime Text 2.icns" file with this new one. Please take note of the fact that, if you're using the frequently updated development version of Sublime Text, with each update, the icon will be removed. 3 - Access the Command Palette Similar to TextMate, we can use Sublime's command palette by accessing the Tools menu, or by pressing Shift + Command + P, on the Mac. 8 - Alignment

mrmartineau/SublimeTextSetup ☠☣ - How to Learn Vim Learning vim can be a bit daunting at first. I know that I spun my wheels on efficiently learning vim for quite some time. I was TRYING hard to learn new things but I didn’t seem to be leveling up in the ways I wanted to. This was mainly due to one fatal flaw. I kept trying to use google. What I found was an amazing set of instructions on how to use vim. If you are on a mobile phone or don’t want to brave navigating around the documentation in vim just yet check out these links below. You’ll notice this list starts at chapter 2. Vim Help Docs The first steps in Vim Moving around Making small changes Set your settings Editing more than one file Splitting windows Using the GUI Making big changes Clever tricks Editing Effectively Typing command-line commands quickly Go away and come back Finding the file to edit Editing other files Inserting quickly Editing formatted text Repeating Search commands and patterns Folding Moving through programs Editing programs Exploiting the GUI The undo tree Using help even more

Sublime Text 2: Tips for moving over I’m a long time Coda user. A few months ago I, like everyone else, decided to switch over to vim. I really liked Vim but just couldn’t get the hang of it for whatever reason. 1. If you do a lot of work in bash, its helpful to open up a file or entire folder in your editor right from the command line. To Install: Run the following line in your terminal.sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /bin/subl This will then give you access to the bash command subl with a number of arguments. The most basic usage is to open the current folder in Sublime Text 2. subl -ab tutorial.html opens the file tutorial.html in the current window but keeps terminal in focus. 2. This was one of the biggest annoyances for me when switching over from coda. HitCommand + Shift + P to bring up the sublime launcher type “user global settings and hit enter. "open_files_in_new_window": false 3. One feature that Coda has just slam dunked is their code hinting. 4. 5. Thats is!

Sublime Text 2 for Ruby Matz has said he wants Ruby to be the “80% language”, the ideal tool for 80% of software development. After switching from TextMate to Sublime Text 2 (ST2) a few months ago, I believe it’s the “80% editor”. You should switch to it, especially if you’re using TextMate. Why Sublime Text 2? Speed. Getting Started I’ve helped a handful of new ST2 users get setup over the past few months. Install the subl command line tool. Leveling Up with Custom Commands Sublime Text 2 makes it dead simple to write your own commands and key bindings in Python. Copy the path of the current file to the clipboard. New key bindings are installed by dropping Python class files in ~/Library/Application Support/Sublime Text 2/Packages/User and then binding them from Default (OSX).sublime-keymap in the same directory. Neil Sarkar, my colleague, wrote most of the code for all of the above within a few weeks of switching to ST2. Running RSpec from Sublime Text 2 This is my favorite part of my Sublime Text 2 config.

Getting Started with Sublime Text 2 - opensoul.org I recently switched to Sublime Text 2 from TextMate. I did not love it at first. As it goes with many of the finer things in life, Sublime is an acquired taste. Here are a few tips that made it easier for me to get into it. Command palette Think of the command palette as Alfred for your code editor. Package Control If you feel like something is missing from Sublime, then there is probably a plugin for it. To use package control, press ⌘⇧P to bring up the command palette, begin to type “install”, and select “ Package Control: Install Package ”. Beat the ugly out of it I cannot figure out a nice way to say this, so I will just say it: out of the box, Sublime is hideous. Update: The new default theme is actually much better. Start by installing the Soda UI theme via Package Control. Ahh, that is better. The syntax highlighting theme that comes with Sublime is alright, but everyone has their favorite theme. Ok, now we can stand to look at it. Opening a project Customizing Settings One more thing

How do I setup/use ruby on rails snippets and autocomplete in sublime text 2 Textmate vs Sublime 2 - Phx Tag Soup Day 10 of the 30 Day Writing Challenge I love, and I mean LOVE TextMate. It was my baby up until this year. TextMate did some amazing things, but their lack of updates started to wear on me. I had seen a few friends starting to use Sublime Text 2 and, at first, totally ignored their praise of the product. Works on all platforms TextMate: OSX Only Sublime: OSX, Linux, Windows Clear choice there. Selecting Lines of Code TextMate: cmd-shift-L Sublime: cmd-L I don’t think I need to explain what this keystroke is doing. Moving lines of code up and down Sublime and TextMate: cmd+ctrl up and down arrows There are some subtle differences in the two though, so read on. TextMate: When you have an entire line selected (cmd-L), it will move the line up or down one line at a time. Sublime: Performs the same when the entire line is selected and when the cursor is on a line of code. Wrapping the guts TextMate: cmd-shift-w Sublime: cmd-shift-w Both applications do the same thing. Wrap multiple lines: Bundles

Snippets — Sublime Text Help Whether you are coding or writing the next vampire best-seller, you’re likely to need certain short fragments of text again and again. Use snippets to save yourself tedious typing. Snippets are smart templates that will insert text for you and adapt it to their context. To create a new snippet, select Tools | New Snippet…. Snippets can be stored under any package’s folder, but to keep it simple while you’re learning, you can save them to your Packages/User folder. Snippets File Format Snippets typically live in a Sublime Text package. The structure of a typical snippet is as follows (including the default hints Sublime Text inserts for your convenience): <snippet><content><! The snippet element contains all the information Sublime Text needs in order to know what to insert, whether to insert it and when. content The actual snippet. Keep the following in mind when writing your own snippets: tabTrigger Defines the sequence of keys you will press to insert this snippet. scope description Note Fields

Related: