Skip to main content

Questions tagged [sublimetext]

Sublime Text is a text and source code editor for Linux, OS X and Windows. PLEASE 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.

sublimetext
Filter by
Sorted by
Tagged with
1396 votes
16 answers
1.1m views

How do I reformat HTML code using Sublime Text 2?

I've got some poorly-formatted HTML code that I'd like to reformat. Is there a command that will automatically reformat HTML code in Sublime Text 2 so it looks better and is easier to read?
Ravi Ram's user avatar
  • 24.4k
749 votes
5 answers
217k views

Set default syntax to different filetype in Sublime Text 2

How do I set a default filetype for a certain file extension in Sublime Text 2? Specifically I want to have *.cfg files default to having Ini syntax highlighting but I cannot seem to figure out how I ...
keiththomps's user avatar
  • 8,025
585 votes
7 answers
149k views

How to customise file type to syntax associations in Sublime Text?

I'd like Sublime 2 editor to treat *.sbt files (to highlight syntax) as Scala language, same as *.scala, but I can't find where to set this up. Do you happen to know?
Ivan's user avatar
  • 63.8k
575 votes
33 answers
446k views

Open Sublime Text from Terminal in macOS

In Terminal when I use .subl It returns -bash: .subl: command not found Anyone know how to open Sublime Text 3 from the command line in macOS?
user1405049's user avatar
  • 5,751
569 votes
13 answers
471k views

Replace \n with actual new line in Sublime Text

How can I replace \n in Sublime Text with real in-editor displayed new line so: foo\nbar becomes: foo bar in the editor when I view the file in it.
leemour's user avatar
  • 11.8k
552 votes
6 answers
243k views

How do I force Sublime Text to indent two spaces per tab?

Is there a way to force Sublime Text 2 to always indent two spaces per tab when working with Ruby files? I know that indentation can be set under the view -> indentation menu option, but it does ...
Mohamad's user avatar
  • 35.1k
511 votes
11 answers
853k views

Comparing the contents of two files in Sublime Text

I have two cloned repositories of two very similar open-source projects, which I have been working on in different instances in Sublime Text 2 to arrive at my desired result. Code from both of these ...
LanceLafontaine's user avatar
510 votes
20 answers
562k views

Indenting code in Sublime text 2?

In Visual Studio I can press Ctrl+K+D to indent everything so the code is structured nicely and readable. Is there a shortcut in Sublime 2 to do the same?
Kimpo's user avatar
  • 5,836
463 votes
11 answers
249k views

Sublime Text 2 - View whitespace characters

How can Sublime Text show non printable characters (I'm interested in SPACEs and TABs)?
imkost's user avatar
  • 8,113
459 votes
10 answers
282k views

How to select all instances of a variable and edit variable name in Sublime

If I select a variable (not just any string) in my code, all other instances of that variable get a stroke (white outline) around them: Is there a keyboard shortcut that will let me select all of ...
Oskar Persson's user avatar
451 votes
10 answers
411k views

Sublime Text 2 - Show file navigation in sidebar

I just switched to Sublime Text as my new editor. If I open the sidebar it shows the opening file, but what I want is a file navigation sidebar, is it possible to change that without downloading ...
sozhen's user avatar
  • 7,657
430 votes
5 answers
240k views

How to convert a selection to lowercase or uppercase in Sublime Text

I have several strings selected in a file in Sublime Text and I want to convert them all to lowercase. How can I convert them all to lowercase in Sublime Text?
arturomp's user avatar
  • 29.3k
377 votes
9 answers
298k views

Replace uppercase with lowercase letters

I'm trying to replace uppercase letters with corresponding lowercase letters using regex. So that EarTH: 1, MerCury: 0.2408467, venuS: 0.61519726, becomes earth: 1, mercury: 0.2408467, venus: ...
leemour's user avatar
  • 11.8k
334 votes
14 answers
172k views

What is the difference between Sublime text and Github's Atom [closed]

Github announced Atom which is very similar to Sublime. Even some keyboard shortcuts like ⌘ + P, ⌘ + Shift + P etc. are same. How is Atom different from Sublime? Does it include IDE features like ...
Om Shankar's user avatar
  • 8,049
328 votes
7 answers
183k views

How to select all instances of selected region in Sublime Text

Is there a shortcut key or single-step menu option to find and select all instances of a highlighted selection in Sublime Text?
Martin Devarda's user avatar
325 votes
6 answers
314k views

Search in all files in a project in Sublime Text 3

Is there a way to search for a string in all files inside a project in Sublime Text 3? The string is not a method.
Ivan's user avatar
  • 20k
320 votes
8 answers
143k views

How to replace four spaces with a tab in Sublime Text 2?

I want to replace all the "four spaces" that is written by another text editor with tabs. How can I do it?
Mohsen's user avatar
  • 65.3k
317 votes
15 answers
585k views

How do I run Python code from Sublime Text 2?

I want to set up a complete Python IDE in Sublime Text 2. I want to know how to run the Python code from within the editor. Is it done using build system? How do I do it ?
neo's user avatar
  • 3,289
312 votes
2 answers
141k views

80-characters / right margin line in Sublime Text 3

You can have 80-characters / right margin line in Netbeans, Text Mate and probably many, many more other IDEs. Is it possible to have it in Sublime Text 3 as well? Any option, plugin etc.?
trejder's user avatar
  • 17.4k
299 votes
8 answers
93k views

How to make ruler always be shown in Sublime text 2?

I use Sublime Text 2 and want a Ruler to be shown in every file with specific line-height. But I have to show it manually in every file.
Denis Óbukhov's user avatar
246 votes
18 answers
108k views

How can I make Sublime Text the default editor for Git?

I have a problem setting Sublime Text 2 as the core.editor with git. I've read through every post I could find addressing the problem, but still nothing is working for me. I am running Windows. I ...
Spencer Moran's user avatar
240 votes
12 answers
62k views

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 ...
rickypai's user avatar
  • 4,016
233 votes
9 answers
192k views

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's user avatar
  • 3,796
227 votes
11 answers
219k views

Sublime Text 3, convert spaces to tabs

I know there are a lot of posts about this, but I couldn´t get it to work. I use tabs for coding. Is there a way, to convert always spaces to tabs? I.e. on open and on Save files? Anyone got an idea? ...
chris's user avatar
  • 4,867
226 votes
30 answers
245k views

Sublime Text from Command Line

I installed Sublime Text and wanted to know how to open rb files in it from the terminal. I saw What is the command to make Sublime Text my core editor? and I see that I can make Sublime my core ...
mehulkar's user avatar
  • 4,935
223 votes
9 answers
484k views

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 ...
user2342558's user avatar
  • 6,273
204 votes
8 answers
241k views

Vim multiline editing like in sublimetext?

I started to use gvim, and I can't quite understand how the multiline edit works in gvim. For example: Original text: asd asd asd asd asd; asd asd asd asd asd; asd asd asd asd asd; asd asd asd asd ...
AlfredoVR's user avatar
  • 4,187
200 votes
6 answers
90k views

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's user avatar
  • 2,101
193 votes
5 answers
68k views

In Sublime Text 2, how do I open new files in a new tab?

When I'm editing with files on the server, and I click to edit them, if I'm editing multiple files (say an HTML file and a CSS file) but they open in new windows, which, on my small laptop display is ...
Doug Smith's user avatar
192 votes
5 answers
127k views

What is the full path to the Packages folder for Sublime text 2 on Mac OS Lion

I'm not seeing this question anywhere so I can only assume I'm doing something really stupid but... What is the full path to the "Packages" folder for Sublime Text 2. I'm looking to install a new ...
Derek Organ's user avatar
  • 8,413
167 votes
7 answers
165k views

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 ... ...
Tony H.'s user avatar
  • 1,975
161 votes
13 answers
54k views

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, ...
Santi Agüero's user avatar
161 votes
9 answers
63k views

How to (easily) get current file path in Sublime Text 3

How to (easily) get current file path in Sublime Text 3 I don't often use ST console (I used it only once to install package manager), but I suppose it could be good way to : get current file path ...
MacKentoch's user avatar
  • 2,416
159 votes
2 answers
55k views

Sublime Text regex not detecting multiline tags

I have this regex here; \[sometag\](.*)\[/sometag\] Which is supposed to catch text surrounded by the [sometag] tag. It works for single line information contained in these tags, like on the string [...
Maurdekye's user avatar
  • 3,657
155 votes
10 answers
217k views

Sublime Text 2 multiple line edit

I want to edit multiple lines and every "word" within that line. For example: 45 28 42 65 24 87 47 95 01 25 87 98 I want to select every whole number in all lines and put a "0x" before it so it ...
Syperus's user avatar
  • 1,707
151 votes
10 answers
132k views

Sublime - delete all lines containing specific value

I have a 900mb log file which I can open in SublimeText 3. This file is bloated with lines similar to the following. 10/08/2014 23:45:31:828,Information,,,,ExportManager: ,No records to send and/or ...
energ1ser's user avatar
  • 2,833
148 votes
7 answers
144k views

Sublime 3 - Set Key map for function Goto Definition

I want to create an Eclipse style shortcut Ctrl+MouseClick to open the function/method. Sublime Text 3 has already this function called goto_definition but it is bound to F12. But I'm not sure how ...
Kivylius's user avatar
  • 6,447
146 votes
9 answers
51k views

Syntax highlighting for Jade in Sublime Text 2?

I just started using Sublime Text 2 on Mac. I also just started using Jade for my views in Node.js, and am wondering if there is a way to add syntax highlighting for Jade into Sublime Text 2.
James Simpson's user avatar
143 votes
3 answers
34k views

Configure Sublime Text on OS X to show full directory path in title bar

On Linux, Sublime Text shows the full path of my currently open file in the title bar by default, but on OS X, it only shows the name of the file. How can I configure Sublime on OS X to show the full ...
Katarzyna's user avatar
  • 1,752
141 votes
15 answers
239k views

Parsing Error The Keyword import is Reserved (SublimeLinter-contrib-eslint)

I have a problem with eslint, it gives me [Parsing Error The keyword import is reserve] this is only occur in sublime, in atom editor work well. I have eslint .eslintrc.js module.exports = { "...
pedro luis's user avatar
  • 1,695
139 votes
15 answers
136k views

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

Though I have tried to modify "font.size" in classes like "Label_control" and "sidebar_control" in the Package "Theme-Default", the font size of the editor does not change at all. Is there anything ...
zhxchen17's user avatar
  • 1,637
135 votes
14 answers
118k views

Why do Sublime Text 3 Themes not affect the sidebar?

I generally only use dark themes for coding, so it's really annoying that Sublime Text 3's sidebar stays light themed whatever theme you apply. Does anyone know how to change this? My configuration: ...
connexo's user avatar
  • 55.8k
134 votes
8 answers
108k views

Find closing HTML tag in Sublime Text

I have a very long and very nested HTML document, where I need to quickly find the closing tag. How can I do this?
Pavel Binar's user avatar
  • 2,106
130 votes
5 answers
140k views

What is the default font of Sublime Text?

I was looking and could not find an answer on this one. Which is Sublime Text's default font type?
Uninvited Guest's user avatar
129 votes
8 answers
89k views

How to get support of TypeScript with Sublime Text 3?

I am currently working in Angular and I get good support of Typescript with Sublime Text. How can I get support of TypeScript with my Sublime Text editor? I tried to hit Shift + Ctrl + P and then ...
Mohan Gopi's user avatar
  • 7,686
128 votes
10 answers
253k views

Shortcut to comment out a block of code with sublime text

I want to comment out a block of code in sublime text. I see it in RailsCasts, but don't think he uses sublime text ... to do the following ... if (uncommented) some uncommented example # if (...
user749798's user avatar
  • 5,340
126 votes
5 answers
79k views

How can I put cursor on every line in Sublime Text?

I want to be able to edit every line of my data simultaneously, for instance put quotations in front of every line. I am wondering what the key combination is that will enable me to do this.
Jacko's user avatar
  • 1,363
126 votes
5 answers
40k views

How do I exclude a folder from search in sublime text 3 permanently?

is there a way to always ignore a folder... in project view. I have multiple apps in one repo and have 'node_modules' in each app mainapp ├── microapp │ └── node_modules ├── microapp2 │ └── ...
nolawi's user avatar
  • 4,589
123 votes
1 answer
53k views

How to jump to previous and last cursor in Sublime Text 3? [closed]

How to jump back and forward through the cursor position history in Sublime Text? I google a lot and find BufferScroll. But it doesn't work for me. I can't find any shortcut or how to use it in the ...
cruelcage's user avatar
  • 2,074
122 votes
5 answers
71k views

How to get an outline view in sublime texteditor?

How do I get an outline view in sublime text editor for Windows? The minimap is helpful but I miss a traditional outline (a klickable list of all the functions in my code in the order they appear ...
user89021's user avatar
  • 15k

1
2 3 4 5
70