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
85
votes
5 answers

Migrate from Sublime text 2 to Sublime text3

I need to migrate from sublime text 2 to sublime text 3 to have all the same configuration/plugins I have installed on the sublime text2. I installed sublime text 3, but it does not have any of the sublime text 2 packages and settings. I really dont…
Fizer Khan
  • 88,237
  • 28
  • 143
  • 153
85
votes
5 answers

Multiple Cursors in Sublime Text 2 Windows

I have installed Sublime Text 2 in windows and I am trying to use the multiple cursors feature. Firstly I highlight the selection I am looking for (three lines). Then I can press CTRL + D to select each re-occurrence, or ALT + F3 to select all.…
StuartM
  • 6,743
  • 18
  • 84
  • 160
84
votes
5 answers

Exit command mode in sublime text 2

I just started using sublime text 2 and when I go into command mode I can't get out. How do I exit out?
Luis Liz
  • 1,939
  • 4
  • 20
  • 31
82
votes
3 answers

Exporting Sublime Text configuration and installed packages

I have spent considerable time to tune up Sublime Text 2 configs. Now I would want to share my configurations (one file) and installed packages list with my friend. What would be the best way to do this? Manually pick related folders in Packages and…
Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
81
votes
10 answers

adding comma to each line using sublime text 2

I am trying to use sublime's text search and replace function and regex to match a string of number in each line and append a comma to each. So here's the sample file: 273794103 418892296 134582886 380758661 109829186 248050497 2167935715 …
adit
  • 32,574
  • 72
  • 229
  • 373
81
votes
9 answers

Merge multiple lines into one using Sublime Text

I am very new to Sublime Text and I am sure this is a naive question. Watching the Multiple line selection at http://www.sublimetext.com/ (2/6 slide). Absolutely love it. I understand that Ctrl (Cmd)+Shift+L "multiple-selects" so that we could do…
Arun Manivannan
  • 4,213
  • 3
  • 29
  • 38
80
votes
7 answers

Sublime Text 2 wrapping selection in tag

In ST2, highlighting some text and pressing alt + shift + w (on Windows) will wrap the current selection in

tags. But is there a way to specify which tag to wrap with? Because maybe I want to wrap in a span, or a div instead.
Lars
  • 7,908
  • 11
  • 52
  • 70
80
votes
3 answers

is there a way to highlight all the special accent characters in sublime text or any other text editor?

I a using the the HTML encode special characters in Sublime text to convert all the special character into their HTML code. I have a lot of accented characters in different parts of the file. So, it would be great if I could select all the special…
kashive
  • 1,356
  • 2
  • 11
  • 17
80
votes
19 answers

Compiling and Running Java Code in Sublime Text 2

I am trying to compile and run Java code in Sublime Text 2. Don't just tell me to do it manually in the Command Prompt. Can anyone tell me how? Btw, I am on Windows 7...
tolluy
  • 919
  • 1
  • 7
  • 4
79
votes
3 answers

Sublime Text 2 Paste with Colors to MS Word

I would like to paste my code to a word document while preserving the highlighted, colored texts. Is there a way to do this?
Mariska
  • 1,913
  • 5
  • 26
  • 43
75
votes
6 answers

Is Crockford style Context Coloring implemented in any code editor?

I watched a video from YUIConf 2012 in which Douglas Crockford gives a talk about implementing monads in JavaScript. In this talk he gives a code example that utilizes what he calls "Context Coloring" which throws out the idea of coloring by…
cs_brandt
  • 1,157
  • 1
  • 10
  • 15
74
votes
7 answers

Sublime Text 2: Auto fix indentation for javascript?

Here's some sample code I have, currently I'm set to only indent using 4 spaces at a time. Is there a way to highlight a block of javascript and press a single button or menu option to format it nicely like so: Before: app.get('/csvtest', function…
Robeezy
  • 2,424
  • 3
  • 22
  • 28
73
votes
3 answers

switching between tabs in sublime "ctrl+tab"

Anyone notice that the default ctrl+tab doesn't work like the typical consecutive tab switching from left to right, e.g., in Chrome? I'm trying to switch to the next adjacent tab, but it seems to jump around (alphabetic order I think). How can I…
roulette01
  • 1,984
  • 2
  • 13
  • 26
70
votes
2 answers

How to indent XML files automatically when opened in Sublime Text 2?

I'm using Sublime Text 2 (with the Indent XML plugin) for editing XML files. How can I configure Sublime Text to automatically execute the "Indent XML" action right after opening a file named *.xml?
Geert Schuring
  • 2,060
  • 1
  • 18
  • 28
68
votes
16 answers

Subl command not working - command not found

I'm having difficulty getting this set up. I fixed my .bash_profile, and created the symlink using the following command from the Sublime website: ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl Yet, when I…
HectorOfTroy407
  • 1,737
  • 5
  • 21
  • 31