FAQ Database Discussion Community

## Can I extend Go To Definition to go to the ruby web API or code definition?

ruby,rake,sublimetext,sublimetext3
I am running into problems where I cannot tell if the code I'm reading is standard ruby, some gem or in house code. To resolve this I would like to extend the capabilities of Go To Definition. Can I configure or add an extension to sublime that will allow Go...

## Replacing parts of expressions in Sublime Text?

regex,sublimetext
I'm using regex find and replace feature in Sublime Text 3, searching for expressions of the form (\cref{exNUMBER}) or (\cref{exNUMBERLETTER}) For example: (\cref{ex1}) (\cref{ex1a}) The following regex finds these expressions just fine: $$\\cref\{ex(\d|\d\l)\}$$ What I'm struggling with is how to replace these same expressions with expressions of the form \eqref{exNUMBER}...

## Modify the edit binary in os x to a different editor

sublimetext,oh-my-zsh,launch-services
On the command line, I can type edit <folder/file name> and it will open in TextWrangler, which I haven't used in ages. I'm not sure how the edit binary got there — I use oh-my-zsh, potentially relevant. I wanted to change subl to edit (nicer to type) and discovered it...

## How do you execute a lua file in sublime text 3?

lua,sublimetext,sublimetext3
How do you execute a lua file in sublime text 3? I tried opening the console and typing build <filename>.lua. I also looked through the menu's for a build and run. Supposedly saving a file or hitting F7 is supposed to execute lua scripts, but that did not work either....

## Sublime API missing

python,sublimetext,sublimetext3,fedora
I try to install 'Sublime Text 3' on Fedora 21 from official site, but when I execute "sublime.py" it says: Traceback (most recent call last): File "sublime.py", line 1, in <module> import sublime_api ImportError: No module named sublime_api but in "sublime.py" has: import sublime_api ...

## Sublime Text - spell check but only certain file extensions

markdown,sublimetext,spell-checking
There's no point of enabling spell check for your html/js/css/c/php/py/etc files, but it can be very useful when you are writing in Markdown. How to enable spell check only for only certain file extensions?...

## How to add stripslashes to get_option()

regex,wordpress,wordpress-theming,sublimetext,stripslashes
Hy, I created a WordPress Theme using a lot of custom options. While saving the options in the backend amongst other things I'm adding backslashes before characters that need to be escaped. Such as ' and ". Now I need to remove them before displaying them on the frontend. The...

## SublimeText 3 - Package Control: Removed directory for orphaned package ColdFusion

coldfusion,sublimetext3,sublimetext,sublime-text-plugin
I am running SublimeText 3 (build 3083). I follow the manual install directions for the ColdFusion plugin as described here (https://github.com/SublimeText/ColdFusion): Download Manually Download the files using the GitHub .zip download option Unzip the files and rename the folder to ColdFusion Copy the folder to your Sublime Text 2 Packages...

## Sublime Text Search and Insert

text,editor,sublimetext
I want to change the below in sublime or anything text editor from 1 ABCWF 2 CDFDDD 4 IHGNMM to 1 'ABCWF' 2 'CDFDDD' 4 'IHGNMM' I have over 1000 records. Is there a way that I don't do it manually?...

## How can I run a sublime plugin command when user types ; or }

sublimetext,sublimetext3,sublime-text-plugin
I have a plugin for Sublime but I want to do something when the user types a } or ; I've tried to handle it on a on_modified event but I can't quite get it to work. Is this the best approach to take?...

## how to change editor behavior in intellij idea

vim,intellij-idea,sublimetext,vi,ideavim
I have installed IDea 14.0.2 just now. I do not know its default editor but it is opening my source files in vi option now. So, not letting me do default action like Ctrl + v, Ctrl + d which was present before and I used to like it. So,...

## How to restore focus to quick panel after focusing some other group to open a file?

sublimetext3,sublimetext,sublime-text-plugin
Situation is like this: I am writing a plugin that needs to: Open quick panel On hover of first item, focus other group Open in that group Restore focus to quick panel input so I can move to next item in list and so on... I did solve 1-3 but...

## Sublime Text 3 - Lyte theme doesn't affect sidebar / tab view

themes,sublimetext,sublimetext3
The Lyte theme should not only change the way the code looks but the appearance of the sidebar and the tab view as well according to this readme. I installed it via Package Control, and it doesn't appear to be working for me: I restarted and reinstalled it several times,...

## Regex for variable name before period in Sublime Text snippet

regex,sublimetext3,sublimetext
So I'm trying to write a snippet for Sublime Text 3 for forEach statements called on Objects. //what I have written at the point where the snippet is triggered myObject.forEa // what should appear after triggering the snippet Array.prototype.forEach.call(myObject, function(){ }) The problem here is to capture myObject in the...

## sublime text webgl autocomplete

javascript,autocomplete,sublimetext2,webgl,sublimetext
I want to get into WebGL, but the functionnames feel so strange. Is there any way of getting the WebGL functions into sublime text's autocomplete? If not, is there any way to get them into any other editor's autocomplete? Thank you!...

## Quote marks broken in Sublime Text Cobalt theme comments?

themes,sublimetext,sublimetext3
In Sublime Text 3 (Mac), I really like the Cobalt theme. However, the theme seems broken. When lines are commented out, the comments change quote marks. Double quotes become single; Single quotes disappear altogether: This is the same window, using the Monokai theme: So: How might I fix this locally...

## How to run R Code in R Markdown file in SublimeREPL?

r,sublimetext,rmarkdown,sublimerepl
I would like to test code parts in my R Markdown code without leaving Sublime Text. For instance: Multiplying the grades with two solves the unreliability problem: {r} chisq.test(2*grades)  In the above example, I would like to select the line that has the code "chisq.test(2*grades)", press my key combination,...

## sublime text 2 word wrap setting doesn't work

sublimetext2,sublimetext,sublimetext3,sublime-text-plugin
I put this preference.sublime-settings, { "ignored_packages": [ "Vintage" ] "word_wrap": true } But the error comes out like this when I save it: Error trying to parse settings: Unexpected character, expected a comma or closing bracket in ~/Library/Application Support/Sublime Text 2/Packages/User/Preferences.sublime-settings:7:2 what's wrong with this?...

## How to stop Sublime Text from showing ~ files on the folder menu?

sublimetext2,sublimetext,sublimetext3
Why is Sublime Text polluting my project view with these files: Gruntfile.js~ (not the Gruntfile, but a copy with a tilde at the end). How can I stop seeing these files in my project view?...

## How do I prevent Sublime Text 3 from auto-indenting a line as a one off

sublimetext2,sublimetext,sublimetext3
When I'm editing HTML or CSS in Sublime Text 3 the lines auto-indent when I hit the [ENTER] key, which generally is very useful. On occasion I find myself wanting to paste a line of markup which is already indented, and this results in double indentation. Is there some other...

## 100% exact Espresso theme for Sublime Text?

themes,sublimetext,color-scheme,espresso
As the title says I'd like to have my Sublime Text 3 with Espresso's default theme. I know there's Soda which is a really similar one but I need that specific color scheme instead of Soda's. I've searched around on Google and there's only modified personal versions but I wonder...

## Collapse all expanded sidebar folders in Sublime Text 2

sublimetext2,sublimetext
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.

## Sublime indentation on per file basis

sublimetext,sublimetext3,indentation
Using Sublime Text 3. When opening files, some of them have indentation of 2 spaces (while the majority have 4 spaces). Is there any way to set indentation on per file basis?...

## Sublime text sass build system: compressed with comments

css,wordpress,sass,sublimetext2,sublimetext
I have two sass build systems installed in my sublime text: sass and sass compressed. The problem is that sass compressed delete all my comments what is pretty bad for the native wordpress style because the first comment block is needed there. Is it possible to create a build system...

## AutoHotkey script for toggling Sublime Text 3 sidebar or is there a native ST setting?

sublimetext,sublimetext3,autohotkey
I'm trying to write an AutoHotkey script for toggling Sublime Text 3's sidebar. Here's what I have so far: ; Custom Script for Sublime Text 3 ; Map 'F10' key to Control+k, Control+b (open/close sidebar) ; If in Sublime Text #IfWinActive ahk_class PX_WINDOW_CLASS F10:: Send {Ctrl down} SetKeyDelay -1 Send...

## Sublime Text 3: Anaconda show lint errors hotkey?

sublimetext,sublimetext3
How do I add a hotkey to view lint errors? It shows me that there is an error, but doesn't tell me what it is. If I want to see the errors I have to right click -> Anaconda -> show error list which seems very inconvenient. I think it...

## Sublime Text: keyboard shortcut to select a function and its content

ubuntu,sublimetext2,keyboard-shortcuts,sublimetext,sublimetext3
function whatever(){ var = a; return a; } Is there any shortcut to select all of the above code? I know Ctrl+Shift+M will select the content within the parenthesis....

## Sublime Text navigate to file in sidebar when opened with CTRL+P (“goto anything”)

sublimetext,sublimetext3
Say I've got opened a project or a directory structure in Sublime Text. When I open a file with CTRL+P, I frequently navigate in the sidebar to the directory that contains it after opening the file, to get my bearings in a large project. It would be nice if this...

## Where to find composer's global packages?

php,sublimetext2,composer-php,sublimetext
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 later the package was installed. Voila! Well, not really. Step...

## Using virtualenv with Sublime Text 3 and SublimeREPL

python,virtualenv,sublimetext,sublimetext3,sublimerepl
I'm trying to setup ST3 to work with Python's virtualenv, running on Windows 8.1. I usually use SublimeREPL with my global Python install to run files. Now that I'm using venvs, though, I'm having trouble getting anything to run. Here's what I've been trying: I have a parent directory with...

## Change Sublime Text 3 Bracket/Indent Rules

sublimetext,sublimetext3,brackets,curly-braces
In Sublime Text 3, I want to change auto bracket rules. By default, I get this class extends Parent implements Interface { } but I want this class extends Parent implements Interface { } how can I accomplish this....

## Is there a way to summarise or list all current PyLint errors, with sublime (or otherwise)?

python,sublimetext,pylint
Is there an option to list all current PyLint errors I have in my project, with sublime, using the Pylinter plugin or otherwise? Here is an example, of similar functionality, in eclipse: ...

## Sublime Text multiline comment with partial selection

sublimetext
Could I make multiline comment for partially selected lines with default Sublime Text adjusments? Select the text this way: And press Ctrl+/ to comment from the beginning of the block to its end....

## Regular expression to replace spaces between numbers with a comma

regex,sublimetext
I have a huge list of the following in a large file that contains information about every country in the world. They are arrays of temperature data, sometimes the spaces vary in length. [23.5 26.3 29.3 31.9 32.8 31.2 28.8 27.8 28.4 29 26.6 23.7] I'm attempting to use sublime...

## SublimeLinter-javac not recognising other packages

java,sublimetext,javac,sublimelinter
I have a Spring Product That I'm trying the use sublimLinter-javac with, and there are a few packages scattered around the project. The problem is that sublimeLinter-javac is not recognising these packages or the classes within. So I end up with 200+ errors per file making the listing pointless. How...

## Sublime does not see env variables

sublimetext,sublimelinter
When running sublime from desctop it does not see my PERL5LIB environment variable. When running it from terminal - everithing is OK. I set my variables in .bashrc and .bash_profile. import os >>> os.environ['SHELL'] '/bin/bash' >>> os.environ['PERL5LIB'] Traceback (most recent call last): File "<string>", line 1, in <module> File "./os.py",...

## Sublime Text: how to enable text replacement

sublimetext
In Notepad++ when I select a text and type something, it automatically deletes the selected text and replaces it with what I'm typing now, even if I'm typing quote characters. In Sublime, if I type quote characters it inserts these around the text instead of replacing it. Is it possible...

## Custom build system for QML in Sublime Text 3

qml,sublimetext,sublimetext3,build-system
I have created a build system for QML in sublime so selecting that build system and doing a ctrl+B builds the qml code for me. But every time I switch between different type files (eg. a .py file and .qml file) I have to change the build system from QML...

## White text in sublime text

colors,sublimetext2,sublimetext
I downloaded Sublime text from them website and my code still white, i don't know why. I unistalled and reinstalled it 3 times, tried to install themes packages etc i don't understand what is wrong. ...

## sublime text 2 shows whole HTML code inside php file in single color?

sublimetext2,sublimetext
sublime text 2 shows all my HTML code inside index.php in single color. same for other php files that contains HTML code. there is no color coding very strange! is'nt. although files containing only php code are normal. i tried every theme and color scheme but same issue exists. ...

## Sublime regex only finds one match per file

regex,sublimetext,sublimetext3
I'm trying to use the following regexp find/replace in Sublime Text to convert a commonjs module require into a es6 module import statement. find: var (\w+) = require$$'(\w+)'$$\; replace import $1 from '$2'; Somehow it only finds one match per file, and only on the first line. What do I...

## Trigger trailing white space on demand on Sublime text 3

python,sublimetext,sublimetext3
Related with the third answer from this question, I would like to refactor this simple plugin so that it works with Sublime Text 3. Please, could you help me? I am new to python, and I don´t know anything about plugin development for sublime. import sublime, sublime_plugin def trim_trailing_white_space2(view): trailing_white_space2...

## How to delete everything to the right of selected text in Sublime Text 3 ?

sublimetext,sublimetext3,sublime-text-plugin
I am not sure if this possible. I am just checking to see if it is. Is there a way to delete everything to the right of whatever I select in Sublime Text ? ...

## Sublime Bug with Regular Expressions

regex,sublimetext2,sublimetext
I'm trying to do a sublime regex search and replace with a backreference. Here's my data set: if(requestType.endsWith("CompleteMulti")) { if(requestType.endsWith("CompletePartial")) { if(requestType.endsWith("Unfulfillable")) { When I run the regular expression: ^.+"(\w+)".+$with replace statement:$1 I get the following output: completemuLti completepaRtial unfulfillaBle As you can see the case of the...

## Markdown syntax highlighting not working as expected

javascript,markdown,syntax-highlighting,sublimetext,sublimetext3
In Sublime Text 3 I am using the package Markdown Extended and Markdown Preview to build the Markdown documents I write. I am trying to get nicely formatted JavaScript code, however, for some reason it isn't being built and displayed correctly. In Sublime, the code is highlighted and looks great,...

## Which operations in the Sublime Text 2 API are thread-safe?

multithreading,sublimetext2,sublimetext,python-multithreading,sublime-text-plugin
In the Sublime Text 3 API, all operations are threadsafe: Threading All API functions are thread-safe ... but in the Sublime Text 2 API, this is not the case. As I've personally learned to my displeasure, some operations will, in an unpredictable and OS-dependent way, fail when called from threads...

## how to do partial search and replace in a file in sublime text?

sublimetext,sublimetext3
I know how to do search and replace for the whole file. Can it also be done partially? I sometimes need this feature because I use a wrong variable for a method sometimes and I want to correct my mistake without changing the variable name globally. For example, I want...

## Sublime - put # at the start of a line rather the start of the code when comment

python,sublimetext2,sublimetext,sublimetext3
When inserting a comment into Python via super+/ , it puts the # at the start of the code, like this: I want to put the # at the start of a line, like this: Are there any settings that allow me to do this?...

## Sublime text: open containing folder with power shell

powershell,sublimetext2,sublimetext
I've found how to open a folder in explorer from sublime text 2, how can I open the folder with an arbitrary program, like Powershell? I'm not looking for Powershell commands, I'm looking for keyboard shortcuts/functions etc to open a fold in a sublime text instance in powershell....

## Is there a way to disable (or at least clear) Find/Replace history in SublimeText 3?

sublimetext,sublimetext3
SublimeText keeps Find / Replace history. Is there an easy way to disable or at least clear this?

## Sublime on Save Build exclude pattern

regex,sublimetext,regex-negation,sublime-text-plugin

## How to highlight tabs and spaces in vim [duplicate]

vim,sublimetext,highlight
This question already has an answer here: Make Vim show ALL white spaces as a character 20 answers I want to highlight tabs and spaces. In sublime text I activated an "draw_white_space": "all" option. After that all tabs and spaces is highlighting. I want to activate the same option...

## Force sublime text to use PATH from the shell value

osx,sublimetext3,sublimetext
I am trying to add a simple build system to sublime text 3. Here is my current project configuration : { "folders": [ { "path": "." } ], "settings": { }, "build_systems": [ { "path":...

## Context-sensitive help on selected word in Sublime Text?

sublimetext,sublimetext3
Is there any way, in Sublime Text, to get help about the currently highlighted keyword? For example, I select the word "file_get_contents", I press F1, and the PHP help page, http://php.net/manual/en/function.file-get-contents.php, opens in a browser. Is it possible to do this? I doesn't seem to be built-in and I couldn't...

## Set custom hotkeys on indent/unindent in Sublime Text 3

sublimetext,sublimetext3,hotkeys
In VIM I'm using Shift+> and Shift+< for indent/unindent code blocks, but this shortcut doesn't works in my ST3 (Mac OS X preferences). How I can solve this issue? By default at preferences: { "keys": ["super+]"], "command": "indent" }, { "keys": ["super+["], "command": "unindent" }, And my preferences file contains...

## NERDTree live-preview (like sublime sidebar)

vim,sublimetext,nerdtree
Sublime's sidebar has a cool feature, where I can just press the arrow keys and get a quick glance of what each file looks like in the editor pane. It doesn't actually open the file -- just shows it in the editor pane. I want to do the same thing...

## Reverse all line of text in Sublime Text

sublimetext,sublimetext3
I have a file where I have multiple lines. Is there an option in Sublime Text 3 to reverse whole line ? Like ABCDEFG to GFEDCBA ...

## How to exclude some directory during search(through ctrl+shift+f) in sublime 2?

python,sublimetext2,sublimetext3,sublimetext
I want to exclude some directory like .venv/lib/python2.7/ from the search result during the search for specific keyword, I don't want the result which come from the above directory, Suppose I want to search keyword "subtitle", I will press ctrl+shift+f then in Find : field I will write subtitle, but...

## How can I apply basic html formatting to a sublime text syntax definition only within

syntax-highlighting,sublimetext,sublimetext3,definition
Ok so by the following yaml definition, shouldn't only what's in between {blah} and {!blah} get text.html.basic syntax highlighting? And the {blah} tags themselves take the highlighting of a comment? Unfortunately it's not happening that way. HTML highlighting is anywhere in the document, and {blah} doesn't get comment highlighting. #...

## Key bindings for navigating through selection regions

sublimetext,sublimetext3
When you press Ctrl+F, enter some search query and click on Find All (or hit Alt+Enter), Sublime Text 3 will find and select all occurrences of searched term found in current document. It will even count then, writing X selection regions in status bar. I'd like to add a functionality,...

## Negative Lookahead/behind Search and Replace Sentences in Sublime Text 3 [duplicate]

regex,sublimetext,sublimetext3,regex-negation,negative-lookbehind
This question already has an answer here: Regular expression to match text that doesn't contain a word? 17 answers I'm editing the text below in Sublime Text 3, I want to remove the sentences that do not contain the string /do not/. Lorem ipsum dolor sit amet, consectetur adipiscing...

## Regular expression substitution in sublime text

regex,string,sublimetext2,sublimetext
I have a lot of strings to edit and replace with the support of regular expression. My strings are like: 'word1 'word2 word3' 'axxx' 'bx bxxxxx' and so on. What I need to do is selecting the last part of the line and replicate it again, so basically what I...

## Sublime Text: set language for each file

sublimetext3,sublimetext
In Sublime Text (3), I can select the dictionary to use for spell checking. However, this setting seems to be global rather than on a per-file basis. This is annoying when I'm working on multiple files that use different languages. How can I achieve that Sublime Text remembers what dictionary...

## JQuery Mobile : navbar inside footer last element displaying incorrectly

html,jquery-mobile,sublimetext,sublimetext3,jquery-mobile-navbar
I'm using JQuery Mobile 1.4.5, and I have no custom CSS of any kind. Code: <div data-role="page" id="page-id"> ... <div data-role="footer" data-position="fixed" style="overflow:hidden;" data-hide-during-focus="false"> <div data-role="navbar">   <ul>    <li><a href="#" class="ui-btn-active">Navbar 1</a></li>    <li><a href="#">Navbar 2</a></li>    <li><a href="#">Navbar 3</a></li>   ...

## how to let pyflakes ignore some errors?

python,sublimetext,pyflakes
I am using SublimePythonIDE which is using pyflakes. There are some errors that I would like it to ignore like: (E501) line too long (E101) indentation contains mixed spaces and tabs whats the easiest way to do that?...

## Convert markdown links from inline to reference

regex,markdown,sublimetext3,sublimetext
I have a changelog file formatted using Github's markdown. Initially I used inline links for every link I needed to add, that is: This is some [example](http://www.stackoverflow.com) line of text. Over time, as the file grew in size, it became a bit messy due mainly to this way of inserting...

## How to search multiple files of specific file type within Sublime Text 3

sublimetext2,sublimetext,sublimetext3
I would like to search for a string within all *.php files in a certain directory (and its sub-directories) using the Shift + Ctrl + F search dialog. My guess was to set the search location to: c:\example\*.php but that gives an error: Unable to open c:\example\*.php Is there a...

## Configurate Keymap of PHPStorm like Sublime Text

configuration,phpstorm,sublimetext,keymaps
When I tried to modify the keymap of PHPStorm to work like Sublime Text. I found a lot of conflict There is any keymap configuration of PHPStorm like Sublime Text ? Thanks...

## Is it possible to extend Sublime Text 3's go_to_definition?

sublimetext,sublimetext3
This will unfortunately be a broad question. go_to_definition: doesn't work for jinja2 macros doesn't go to variable declarations I also want it to add a suffix and search for that phrase too Is it possible to improve the go_to_definition so I can make it work for the above scenarios?...

## Debugging broken Sublime Text 3 keyboard shortcuts

sublimetext2,sublimetext,sublimetext3
After installing a couple of Sublime Text packages, some of the previous keyboard shortcuts were broken. What's the best way to find the package which defines a keyboard shortcut?...

## Sublime layout split into 3 panel, to create custom layout

python,sublimetext,sublimetext3,sublime-text-plugin
Is there any way I can split layout into 3 ? I got this snippet from net self.window.set_layout({ "cols": [0, 0.5, 1], "rows": [0, 0.5, 1], "cells": [[0, 0, 1, 1], [1, 0, 2, 1], [0, 1, 1, 2], [1, 1, 2, 2]] }) But this will split in to...