Questions tagged [sublimetext2]

DO NOT USE THIS TAG UNLESS YOUR QUESTION IS SPECIFICALLY ABOUT SUBLIME TEXT ITSELF. Do not tag your IDE or source code editor in questions about unrelated topics. Sublime Text 2 is a multi-language and cross-platform sophisticated code editor developed by Jon Skinner. Please note that version 2 is obsolete and Sublime Text 3 is now the default version. Version 4 is currently in development.

Sublime Text 2 is a multi-language, multi-platform code editor developed by Jon Skinner. Please note that version 2 is obsolete and Sublime Text 3 is now the default version. Version 4 is currently in development.

Features of Sublime Text 2:

  • Slick and Fast UI
  • A text minimap (zoomed out view of your entire file)
  • Multi-select (make changes in multiple pieces of selected text at once)
  • Goto anything (quick navigation within files and projects)
  • Snippets and macros
  • Supports plugins written in Python

TextMate snippets and themes port over nicely to Sublime Text.

Useful links:

4042 questions
68
votes
6 answers

Sublime Text 2: How to get scss and Less files to have color?

I'm using Sublime Text 2 and the css.scss and css.less files are in all white text - the comments, brackets, syntax - everything. If I look at my regular css files, they have color to differentiate all of the above. Has anyone else dealt with this?…
Jryl
  • 1,156
  • 4
  • 11
  • 20
68
votes
7 answers

Close all tabs, but not the window, in Sublime Text

Is there a way to close all tabs in one go in Sublime Text, but leave the window with the current project open? It is really annoying when I just want to close all open file and start the new task I have to Cmd-W them one by one. If I do Cmd-Opt-W…
firedev
  • 20,898
  • 20
  • 64
  • 94
66
votes
7 answers

Installing packages in Sublime Text 2

When I go to browse packages in Sublime Text 2, the packages folder is full of all the plugins I wanted like Zen coding and SidebarEnhancements. My installed packages folder only has package control in it though. Should other installed packages be…
jfoutch
  • 1,390
  • 3
  • 14
  • 24
66
votes
3 answers

How can I do a column select across the entire file?

Is there a way I can use the middle click or maybe (Ctrl+Alt+Up) to a particular column across all lines in a long file? Currently, I am middle-clicking and then dragging this to the end of the screen and waiting for it to select all lines.…
Legend
  • 113,822
  • 119
  • 272
  • 400
64
votes
3 answers

How to prevent Sublime Text 2 from swallowing closing brackets, quotes and parentheses?

Sublime has this behaviour which is really annoying sometimes when you have to type in constructions with lots of brackets. When you type ( it adds () and puts the cursor in the middle, all fine, if you however will type ) it will silently swallow…
firedev
  • 20,898
  • 20
  • 64
  • 94
64
votes
5 answers

Defining scope for custom Sublime Text 2 snippets

While trying to write my own snippets for Sublime Text 2, I ran into the following two problems: Finding scope keys. I figured out that I can look through my packages one by one and find references to a declared "scope" property. For example in…
James Heston
  • 923
  • 1
  • 8
  • 17
64
votes
2 answers

reindent shortcut in sublime text

Possible Duplicate: Indenting code in Sublime text 2? I'm trying to learn keyboard shortcuts in Sublime. What is the keyboard shortcut in Sublime Text 2 for reindent? According to some pages it should be TAB but that only indents, not reindents.
Yaron Naveh
  • 23,560
  • 32
  • 103
  • 158
60
votes
3 answers

Select all and multiple cursors using SublimeText2

I have a text file with 100's of news articles. I need to Select All > Take cursor to the beginning of each line and have the 'multiple cursors' open so I can add some data. Since the new articles do not have the same begging character, I can not…
Ravi Ram
  • 24,078
  • 21
  • 82
  • 113
59
votes
6 answers

Sublime Text: How to jump to file from Find Results using keyboard?

If you File > Find in Files... ⇧+⌘+F you're brought to the Find Results, listing the files and highlighted matches. You can double-click either the filename/path or the matched line to open the file at the right line. I wonder if there is a way to…
muhqu
  • 12,329
  • 6
  • 28
  • 30
59
votes
5 answers

Sublime Text 2 how to change the font size of the file sidebar?

The current font size of the file sidebar is to small for me. How can I make it larger?
denysonique
  • 16,235
  • 6
  • 37
  • 40
59
votes
2 answers

Sublime Text 2 console input

I use Sublime Text 2 but it won't let me enter any value when my code asks for user input. (In other words: input() in Python and gets in Ruby fail to correctly prompt me for input). Python throws an EOFError error (what you get when user doesn't…
roflol
  • 637
  • 2
  • 7
  • 9
58
votes
9 answers

ERROR: delete on table violates foreign key constraint. Key id is still referenced from table (many)

I'm working with Rails and PostgreSQL and have a basic one-to-many relationship going on, one Auction has many Bids. However when I try and delete an auction (that has bids present) I get the following error: ERROR: update or delete on table…
TABISH KHAN
  • 1,553
  • 1
  • 19
  • 32
58
votes
5 answers

In Sublime Text 2 How to view carriage return and line feed?

In notepad++ there is a toolbar button to switch on/off display of EOL characters, i.e. carriage return and line feed. Can Sublime Text 2 do the similar thing?
chance
  • 6,307
  • 13
  • 46
  • 70
58
votes
14 answers

Problems using subl command in terminal: "Command not found" & "No such file or directory"

I want to apologize in advance that this is a newbie question! I've spent the last 2 hours trying to find a solution. I have two problems (I'm sure related). Background: This is what my $PATH looks…
Ralitza
  • 741
  • 2
  • 7
  • 12
55
votes
1 answer

robots.txt and .htaccess syntax highlight

Is there a way to colorcode/highlight robots.txt and .htaccess syntax? E.g. with a SublimeText2 plug-in. I found this, but can't figure out how to install it: https://github.com/shellderp/sublime-robot-plugin
Geo
  • 12,666
  • 4
  • 40
  • 55