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
115
votes
6 answers

How can I jump to line in Sublime Text?

Does anyone know of a shortcut for jumping to a specific line (given a #) in Sublime Text? Ex: I run code and get an error at line 5765. I want to be able to jump quickly in Sublime Text to line 5765, without scrolling.
Alexsandra Guerra
  • 1,625
  • 4
  • 17
  • 19
114
votes
9 answers

How to Install Sublime Text 3 using Homebrew cask

How can I use Homebrew cask to install Sublime Text 3? I only see Sublime Text 2 when using Homebrew's search. I even tried tapping homebrew/versions, but no luck.
ZakTaccardi
  • 12,212
  • 15
  • 59
  • 107
113
votes
8 answers

How to insert a column of increasing numbers in Sublime Text 2?

text text text text after the editing, those text becomes to 1 text 2 text 3 text 4 text It's easy in Notepad ++ with the Column Editor, but I don't know how to do the same in Sublime Text 2.
yulanggong
  • 1,348
  • 2
  • 9
  • 12
109
votes
14 answers

Sublime Text 2 keyboard shortcut to open file in specified browser (e.g. Chrome)

I do web development and am trying out Sublime Text 2. Is there a keyboard shortcut to open the current file in specified browser (e.g. Chrome)? Any help to get setup in Sublime Text for web development is appreciated!
wwwuser
  • 6,282
  • 8
  • 52
  • 64
105
votes
4 answers

Set Encoding of File to UTF8 With BOM in Sublime Text 3

When I open a file in Sublime Text 3, at the bottom I have an option to set the Character Encoding as shown in the screenshot. There is the option to set it to UTF-8 , which after doing some research means UTF-8 Without BOM, but I want to set it to…
J86
  • 14,345
  • 47
  • 130
  • 228
103
votes
3 answers

Mark current Line, and navigate through marked lines

In Visual Studio, we can use: CTRL+kk to place a marker on the current line and CTRL+kn to navigate through marked lines. My question is: is there a way to do this with Sublime Text2? Thanks
André Alçada Padez
  • 10,987
  • 24
  • 67
  • 120
102
votes
7 answers

Getting full JS autocompletion under Sublime Text

I just installed the Sublime Text under Windows Vista, and even following the advice given in this post, namely to explicitly set View > Syntax > JavaScript > JavaScript, I only see suggestions based on what I have previously typed. I even installed…
ezequiel-garzon
  • 3,047
  • 6
  • 29
  • 33
100
votes
5 answers

Sublime text 2 - how to order a list of words alphabetically (DESC / ASC)

Is there any way to order a huge list of words alphabetically? for example: Hey Salcaiser Ok Here Strange Weird Gosh By huge i mean about 500/1000 words (1 word per line) I'm on Mac osx
itsme
  • 48,972
  • 96
  • 224
  • 345
99
votes
1 answer

RegEx in Sublime Text: Match any character, including newlines?

Is there a way to match any character in Sublime Text, including newlines? I saw that Sublime uses Boost's syntax but that the . character won't match newlines without a specific flag set.
Joseph
  • 12,678
  • 19
  • 76
  • 115
97
votes
4 answers

Remove/Add Line Breaks after Specific String using Sublime Text

Using Sublime Text 2 - Is it possible to insert a line break/text return after a specific String in a text file e.g. by using the Find ‣ Replace tool? (Bonus question: Is it possible to remove all line breaks after a specific String)
Bernd
  • 11,133
  • 11
  • 65
  • 98
95
votes
8 answers

Where to find composer's global packages?

For a plugin for Sublime Text I was required to install a composer package globally. In order to do this I had to run the following command: composer global require "asm89/twig-lint" "@stable" The installation started running and a few seconds…
Peter
  • 8,776
  • 6
  • 62
  • 95
95
votes
5 answers

Collapse all expanded sidebar folders in Sublime Text 2

Is there a menu option or keyboard shortcut to collapse all expanded folders in the sidebar? It gets messy over there and seems like there should be a better way than closing them one by one.
neurodynamic
  • 4,294
  • 3
  • 28
  • 39
95
votes
5 answers

Fold / Collapse the except code section in sublime text 2

Is there any plugin or shortcut to hide all except code section in sublime text 2? I need to fold all except section at a time , Not fold one section at a time. Thanks~
newBike
  • 14,385
  • 29
  • 109
  • 192
92
votes
2 answers

Multi-selection with regex (sublime text 2)

Is there a way I can enable multi-selection with regex? I don't want to do search and replace, I just want to highlight/select all of the matches according to regex. Is this possible?
Allen
  • 3,601
  • 10
  • 40
  • 59
89
votes
4 answers

How to save/restore Sublime Text 2 configs/plugins to migrate to another computer?

I need to migrate from one Mac to another, and want Sublime Text 2 on a new computer to have all the same configuration/plugins I have installed on the old one. Is there some folder(s) I could just copy and restore on another one to replicate…
earlyadopter
  • 1,537
  • 4
  • 16
  • 21