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
251
votes
15 answers

How to use Sublime over SSH

I'm trying to use Sublime Text 2 as an editor when I SSH in to my work server, and I'm stumped. I found this http://urbangiraffe.com/2011/08/13/remote-editing-with-sublime-text-2/ (among many other posts) that looks like it might help, but I don't…
thumbtackthief
  • 6,093
  • 10
  • 41
  • 87
242
votes
11 answers

How to fix/convert space indentation in Sublime Text?

Example: If I have a document with 2 space indentation, and I want it to have 4 space indentation, how do I automatically convert it by using the Sublime Text editor?
Magne
  • 16,401
  • 10
  • 68
  • 88
240
votes
12 answers

Limit File Search Scope in Sublime Text 2

In Sublime Text, I often use Cmd+P/Ctrl+P to search and jump between files. Often, it would pick up temporary or cached files like .scssc or things in the /tmp folder. Is there a way that I can limit what is shown in the search result?
rickypai
  • 4,016
  • 6
  • 26
  • 30
229
votes
9 answers

Showing the same file in both columns of a Sublime Text window

When I have 2 columns set in a Sublime Text window, can I display the same file in both columns?
user2777473
  • 3,736
  • 5
  • 26
  • 39
226
votes
6 answers

How do I skip a match when using Ctrl+D for multiple selections in Sublime Text 2?

I have some code like: testVar = { a: 1 }; testVariable1 = 2; var c = testVar.a + testVariable2; var d = testVar; I want to rename "testVar" variable. When I set multiple cursors with Ctrl+D and edit variable, "testVariable" is also selected and…
Just_Mad
  • 4,029
  • 3
  • 22
  • 30
214
votes
10 answers

How do you print in Sublime Text 2

Sublime Text 2 seems like a great editor. I just started using it a week ago in eval mode and it doesn't seem to have any printing functionality. This seems preposterous to me, but I can't find it anywhere. Is this a feature unlocked after…
John Biddle
  • 2,664
  • 2
  • 15
  • 25
198
votes
3 answers

Add a number to each selection in Sublime Text 2, incremented once per selection

Is there a way to add insert a number that is incremented once per cursor in Sublime Text 2? Example, with | as the cursor: Lorem ipsum dolor sit amet, | vehicula sed, mauris nam eget| neque a pede nullam, ducimus adipiscing, vestibulum…
Michael Robinson
  • 29,278
  • 12
  • 104
  • 130
193
votes
5 answers

How can I select every other line with multiple cursors in Sublime Text?

In Sublime Text 2, is it possible to instantly select every other (or odd/even) line and place multiple cursors on those lines? Thanks.
user2136580
  • 2,031
  • 2
  • 13
  • 5
182
votes
9 answers

Sublime Text - JSON formatter shortcut

I'm using SublimeText. How to reindent Json code with a shortcut? I've already installed packageControl and it works. I already tried JsonReindent package but it has not a shortcut by default and i don't know its command name. I already have this…
user2342558
  • 5,567
  • 5
  • 33
  • 54
180
votes
4 answers

Fixing Sublime Text 2 line endings?

Here is my Settings - User config: { "auto_indent": true, "color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme", "default_line_ending": "LF", "detect_indentation": true, "font_size": 10.0, "ignored_packages": …
mintobit
  • 2,363
  • 2
  • 15
  • 15
176
votes
3 answers

What are the advantages of Sublime Text over Notepad++ and vice-versa?

Lots of friends have suggested me to start using Sublime Text instead of Notepad++, but I've been happy so far with Notepad++. I use Notepad++ mainly for quick editing files (Haskell, Python, C#, HTML, JS, CSS, etc.), copying & paste pieces of text…
Oscar Mederos
  • 29,016
  • 22
  • 84
  • 124
167
votes
7 answers

How to paste text to end of every line? Sublime 2

I'm curious if there is a way to paste text to the end of every line in Sublime 2? And conversely, to the beginning of every line. test line one test line two test line three test line four ... Say you have 100 lines of text in the editor, and you…
Tony H.
  • 1,975
  • 4
  • 14
  • 20
165
votes
6 answers

Removing projects in Sublime Text 2 and 3

How do you remove a project from Sublime Text 2 and 3's project windows (Ctrl+Alt+P) ? Delete has no effect, there is no contextual menu, and deleting the associated files *.sublime-project and *.sublime-workspace doesn't remove the project from…
Anto
  • 6,806
  • 8
  • 43
  • 65
164
votes
7 answers

How to remove a package in sublime text 2

I would like to remove and/or deactivate the Emmet package in Sublime Text 2. Should I just remove the Emmet directory or what is the typical workflow for removal of a package?
thomasstephn
  • 3,775
  • 4
  • 24
  • 29
161
votes
13 answers

How to use sidebar with the keyboard in Sublime Text 2 and 3?

When using Sublime Text 2 we tend to open the side bar to navigate thru files/folders in our projects. For that we can use the hotkey ctrl+k ctrl+b (in windows). However, once we're in the side bar, we can't use it with keyboard (arrows for…