Questions tagged [sublime-text-2]
Sublime Text 2 is a cross-platform GUI text editor for Windows, OS X and Linux.
444
questions
86
votes
4
answers
83k
views
How can I filter a file for lines containing a string in Sublime Text 2?
I want to filter a file I'm editing in Sublime Text 2 for lines contain a certain string, if possible including regular expressions.
Consider the following file:
foo bar
baz
qux
quuux baz
When ...
67
votes
2
answers
90k
views
Search and replace with TAB character in Sublime Text 2
In Sublime Text 2, I want search and replace by the TAB character.
I tried replacing with \t char but it's not working.
How can I do it?
58
votes
3
answers
45k
views
Sublime Text 2: how to force all files to open in a single window?
I like using a single Sublime Text 2 window with multiple tabs. Currently, when I click on files in Finder that are openable via ST2, they open in separate ST2 windows. How do I force ST2 to open ...
51
votes
1
answer
27k
views
Convert variables between camel case and underscore style
I would like to convert variables from or to UpperCamelCase, lowerCamelCase, underscore_style, or even "separate by spaces". This would be useful for coding and making documentation.
I use Sublime ...
48
votes
3
answers
19k
views
Turn Off Parenthesis Matching in Sublime Text 2
I have questions about turn off parenthesis matching. Does anyone know how to turn off parenthesis matching?
example:
When I type a (, it will automatically add ), becomes ().
It's pretty nice for ...
48
votes
4
answers
26k
views
In Sublime text, how do you disable increase/decrease font size with ctrl and mouse wheel?
With Sublime Text, is it possible to disable increase/decrease font size when using control and mouse? I found the key bindings for ctrl and +/-:
{ "keys": ["ctrl++"], "command": "increase_font_size"...
48
votes
1
answer
26k
views
How do I assign a keyboard shortcut to recorded macro in Sublime Text
I have a bunch of macros which I have recorded and saved in Sublime Text 2. I'm trying to assign keyboard shortcuts to each of those, but I'm kind of lost as to how to go about doing this,
I had a ...
44
votes
3
answers
138k
views
Sublime Text 2 - Encoding UTF-8
How do I change the file encoding in Sublime Text 2?
How do I change character encoding of a text file in OpenOffice.org writer?
http://www.sublimetext.com/forum/viewtopic.php?f=4&t=3541
41
votes
1
answer
14k
views
Possible for Sublime Text 2 to save on loss of focus?
Textmate can save files when I switch focus to another application (that is, on blur).
Is it possible to set this up in Sublime Text 2?
40
votes
1
answer
26k
views
Hotkey to remove duplicate lines in Sublime Text 2?
I'd like to add a hotkey for the menu item Edit>Permute Lines>Unique, but what I've added to my user keybindings isn't working:
[{ "keys": ["f8"], "command": "permuteLines method unique" }]
What ...
35
votes
6
answers
44k
views
How to open file using only keyboard in Sublime Text?
How do I open a file using only keyboard in Sublime Text 2/3?
Looking for equivalent of <Esc>:e /path/to/file from Vim.
34
votes
5
answers
15k
views
Can I right-click a folder in Windows 7 and choose "Open with Sublime Text"?
In Windows 7, I can do this at the command line:
"c:\Program Files\Sublime Text 2\sublime_text.exe" samplefolder
This launches a Sublime Text window, with the contents of samplefolder loaded in ...
32
votes
7
answers
176k
views
How to shift a block of text to the right/left in Sublime Text 2
How do I shift a block of text to the left or right with Sublime Text 2?
31
votes
1
answer
15k
views
Hide build results window in Sublime Text 2
After a build command (control + b) a window with results appear. Is there any way (not automatically but by shortcut or using another command) to hide it?
29
votes
2
answers
45k
views
Set current language without saving file in Sublime Text
I have recently started using Sublime Text 2 after getting tired with Notepad++. Now, if I wanted to set what language I am currently programming in in Notepad++, I would go to the Language menu, and ...
29
votes
1
answer
13k
views
Switch between columns' active tabs in Sublime Text 2
I know Sublime Text makes the following commands available:
ctrl+tab and ctrl+shift+tab - navigate through recent tabs
ctrl+pageup and ctrl+pagedown - navigate through adjacent tabs
I usually keep ...
25
votes
5
answers
72k
views
Sublime Text 2: Disable cursor position overwriting characters (like vim replace mode)
I'm not sure how, but I managed to get Sublime Text into a 'Replace Mode' which at whatever position the cursor is at, it overwrites the next character with whatever you press instead of inserting it. ...
25
votes
9
answers
74k
views
Sublime Text: Find-and-replace within selection
Does Sublime Text 2 allow the user to perform find-and-replace, limited to the current selection?
I should think it must, only I've been unable after multiple searches to find how to carry it out.
23
votes
4
answers
49k
views
Is there an HTML auto-indentation feature or plugin for Sublime Text (aka prettify/beautify/format)?
For example, something to change:
<section><article><h1></h1><p></p></article></section>
to:
<section>
<article>
<h1></h1&...
22
votes
1
answer
7k
views
Change middle mouse button in Sublime Text
On Sublime Text running on Windows the Middle Mouse button acts as select range, on Linux its Shift+Right click. How can I set the middle mouse button to be select range on Linux? Specifically ...
21
votes
1
answer
7k
views
Opposite of CTRL+D in Sublime Text 2
In Sublime Text 2, one may extend selection to include the next occurence of the current selection with CTRL+D.
I often find myself pressing this one too many times, necessitating I clear selection ...
21
votes
3
answers
15k
views
How do I record and run multiple find/replace with Sublime Text 2?
How do I record and run multiple find/replace with Sublime Text 2? I tried recording a macro but, as it seems, Sublime won't record find/replace, only text input etc.
21
votes
1
answer
2k
views
Open up results from Find Results window in new tab/column
In Sublime Text 2 on Mac, I am using the two column layout. Is it possible to open results from the Find Results tab (when I search through a directory/multiple files) into the opposite tab. For ...
20
votes
5
answers
26k
views
Is there a way in Sublime Text to display find results in a panel at the bottom of the current window?
This is a highly useful feature in other editors eg. Eclipse and Notepad++
You get to see the list of find results printed as all the containing lines with their lines in the buffer, which gives you ...
19
votes
3
answers
33k
views
Better syntax highlighting for Java in Vim?
I've found Vim to have fantastic syntax highlighting with my preferred color schemes for Ruby and Python, but whenever I need to write Java code, it's like I haven't even turned on highlighting in the ...
18
votes
3
answers
9k
views
vi/vim alternative to sublimetext's "Expand selection to scope"
Sublime text has a cool feature called "Expand selection to scope" SHIFT+CMD+SPACE which selects the everything within the scope.
It select everything in scope, works perfectly ( ) or [ ] or { } ...
18
votes
1
answer
13k
views
Search all within opened tabs with Sublime Text 2
Having Sublime Text 2 Text Editor:
Is it possible to search within all the tabs that are open? How?
18
votes
4
answers
16k
views
Edit both opening and closing html tag
Is there a way (core or plugin) that a closing html tag name changes accordingly when renaming the opening one ? A behaviour similar to multi-selection...
18
votes
4
answers
32k
views
Autoindentation in Sublime 2 text editor
Is there an auto indentation option in Sublime 2?
In Visual Studio I can press Ctrl+K+D to indent everything so the code is structured nicely.
Is there a shortcut in Sublime 2 to do the same?
16
votes
2
answers
10k
views
How to have Sublime Text 2 show git folders and files in the sidebar?
When adding a folder to a Sublime Text 2 project, it doesn't seem to show .git subfolders. It also seems these files cannot be opened by Ctrl-P.
I disabled the Git plugin but that didn't help.
14
votes
3
answers
16k
views
Renaming open files in sublime text 2
I am trying to rename open files in sublime text 2. In version 2.0.1 Build 2217, you could rename by pressing f2 or by opening the command palette by pressing Ctrl + Shift + P and entering rename. ...
13
votes
3
answers
5k
views
Disable a Sublime key-binding entirely?
I want to get rid of these completely:
{ "keys": ["ctrl+up"], "command": "scroll_lines", "args": {"amount": 1.0 } },
{ "keys": ["ctrl+down"], "command": "scroll_lines", "args": {"amount": -1.0 } },
{ ...
13
votes
2
answers
21k
views
Setting up Sublime Text 2 Custom Keyboard Shortcuts
I'm a Vim user trying to move to Sublime Text 2, as it's faster than MacVim with a bunch of stuff open.
I have may custom keyboard shortcuts in Vim, that I would like to transfer to ST2.
How can I ...
13
votes
2
answers
12k
views
Where does Sublime Text store unsaved files on Linux?
I have an unsaved file that I am trying to locate after a crash on Linux Mint. Where does sublime text store unsaved files on Linux OS?
13
votes
1
answer
2k
views
How to prevent ST2 from searching in excluded folders?
I've got a sublime-project like this:
{
"folders":
[
{
"path": ".",
"folder_exclude_patterns": ["_doc", "cache", "logs", "_release"],
"file_exclude_patterns": ["...
13
votes
1
answer
5k
views
How to make Sublime Text 2 spell check comments only?
The built-in spell check feature seems to be running over the whole code, underlining lots of text that is supposed to be that way i.e. the code itself.
Any way to limit it to just comments (//)?
13
votes
2
answers
8k
views
Sublime text keyboard shortcut binding not functioning
Following the instructions here, I've set up a new installation of SublimeText for use with R. I have no other SublimeText plug-ins installed. The keyboard shortcuts that are setup using the ...
12
votes
1
answer
2k
views
sublime text 2 open file from find results keyboard shortcut
In the Sublime Text 2 "Find in Files" results, a box is drawn around wherever your search term appears. Double clicking within that box opens the file and focuses your cursor on that line.
Is there ...
12
votes
1
answer
938
views
sublime text 2 - display jsdocs while typing
I installed the JsDocs package and use it to document my code. ATM I'm using SublimeCodeIntel with Alt+Click to jump to the documentation, but this is quite annoying, especially when you just want to ...
11
votes
6
answers
14k
views
Unicode Composition in Sublime Text
I'm not able to use unicode composition (The ctrl+shift+u method) to enter unicode characters in Sublime Text 2 (v2.0.1, Build 2217) on Ubuntu 12.04 (Unity). To reproduce, just open up a tab and do ...
11
votes
3
answers
11k
views
Sublime Text 2 opens last opened files from last session
Whenever I open Sublime Text 2 on Fedora, it used to restore the last session.
But now in Mac OS X Mountain Lion, and it's not opening the window from the last session. What setting do I need to ...
11
votes
3
answers
7k
views
Sublime Text 3: How to jump to the parent/enclosing function?
Is there a quick keyboard shortcut or Command Palette function to quickly jump to the parent/enclosing function?
So if the cursor is in a function, then I want to quickly jump to the first line of ...
11
votes
1
answer
874
views
Sublime Text: Disable Find in Selection
I sometimes have selected text when I open the find panel and Sublime Text defaults to "finding in selection". I never want this, any way I can disable it?
11
votes
3
answers
25k
views
Sublime Text 2 IntelliSense - How to?
I would like to plug IntelliSense-like functionality into Sublime Text 2. Is there a package that does this?
10
votes
5
answers
9k
views
Creating new bash command for Sublime Text 2
I'm trying to get Sublime Text 2's command line alias working.
The instructions make perfect sense: Run
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
So, in ~/...
10
votes
3
answers
34k
views
In Sublime Text how do you short-cut writing code?
My apologies but I do not know what its called, if this has been asked or what Stack site this is best suited for. I've seen several videos on how people use Sublime to create quicker tags and I ...
10
votes
3
answers
10k
views
Sublime: Save set of tabs to open
I have several files that I edit frequently, and I need all of them open at the same time. I am wondering if there is a way in sublime to save a set of files to be open...sort of like how in chrome or ...
10
votes
1
answer
7k
views
How can I set key bindings for menu items in Sublime Text 2?
There is no keyboard shortcut for menu items such as Refresh Folders. I have to use my mouse every time.
How can I define key bindings for menu items in Sublime Text 2?
9
votes
5
answers
17k
views
Multiple cursors in Sublime Text under Ubuntu
I just switched from Windows to Ubuntu 13.04 and I'm missing a function in Sublime Text,
On Windows I used the middle mouse button to set multiple cursors (a bit like holding Ctrl and adding cursors ...
9
votes
4
answers
9k
views
How to jump previous or next position in Sublime Text 2?
I want to jump to the previous (or next) position in Sublime Text 2.
C-i, C-o in vim.
Ctrl-, Ctrl= in Visual Studio.
How can I do it in Sublime?