FAQ Database Discussion Community

## 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 ...

## 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...

## 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...

## 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....

## 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?...

## 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":...

## 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...

## 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...

## 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...

## 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. ...

## 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...

## 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 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 ? ...

## 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...

## 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...

## 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...

## 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}...

## 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 ...

## Sublime Text build system on Ubuntu: Cannot chain pkill command regardless of success

linux,bash,ubuntu,sublimetext,build-system
I'm trying to first kill a running process pkill -f "java.*MySketch" then run it again processing-java --sketch="~/MySketch" --output="~/MySketch/build-tmp" --run --force However on first build the process isn't running so pkill finds nothing. I want the build system to skip this error and move on to executing processing-java. Processing.sublime-build "linux": {...

## 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...

## 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?...

## Sublime on Save Build exclude pattern

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

## 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 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",...

## 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...

## 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...

## 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?...

## 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....

## 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?...

## 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: ...

## 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 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: 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...

## 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...

## 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?

## 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...

## 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,...

## 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,...

## 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: 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....

## 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?...

## 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 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....

## 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 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...

## Sublime text: How to do sentence case (capitalize the first letter of a sentence)

sublimetext2,sublimetext,sublimetext3
I'm aware that there is Edit > Change Case menu. But there's no option for sentence case. How do I achieve this? Is this possible for regex to achieve this?...

## 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!...