python-3.x,beautifulsoup,sublimetext2
Assuming you are using Windows: I had a similar problem that was solved configuring the system path. To set a system path, add the Python folder (in my case, C:\Python3.5) to your Environment Variable "Path". Computer > Left Click > Properties > Advanced System Settings > Environment Variables > Find...
sublimetext2,sublimetext,sublimetext3
Found the answer here: https://www.sublimetext.com/forum/viewtopic.php?f=3&t=16262#p61284 Create a folder called Theme - Default in your Packages folder, and copy your fold.png variant there. You can get to your Packages folder through "Browse Packages" in Command Pallet CtrlShiftP fold.png has to be 16 x 16px, and unfortunately you can't make it 0...
javascript,sublimetext2,sublimetext,sublimetext3,developer-tools
I haven't used it personally, but the Web Inspector plugin looks promising. It's essentially a JS version of XDebug (for PHP), and allows you to debug code using ST2/ST3 and Chrome. Its features include: Breakpoints for project stored in user settings with absolute paths. Console. Debugger steps and breakpoints. Stack...
c,build,compilation,sublimetext2
A linear congruential generator is a simple way of generating pseudorandom numbers, and can be implemented using very little code. In fact, if you use one that generates a sequence of maximal length, then there's no need to check for values that have already been returned because it will generate...
(?<=href=")[^"]* Try this.Replace by empty string. See demo. https://regex101.com/r/sH8aR8/40...
search,replace,sublimetext2,sublimetext
Make sure that the option whole word (Alt + W) in the replace toolbar is turned OFF
python,sublimetext2,sublimetext,sublimetext3
Create a new file in Sublime with XML syntax, and the following contents: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>name</key> <string>Comments</string> <key>scope</key> <string>source.python</string> <key>settings</key> <dict> <key>shellVariables</key> <array> <dict>...
Look behinds (typically) can't be of variable length, but by using a negative look ahead, you tell it what not to match: å(?!.*answer) This matches "å", but only if "answer" doesn't appear somewhere after it....
regex,sublimetext2,sublimetext3
Use the below regex and then replace the matched chars with an empty string. "Currency"\s*:\s*"[^"]*", OR "Currency"\s*:.*?,(?="[^"]*"\s*:) DEMO...
bash,sublimetext2,sublimetext,sublimetext3
You need to wrap your path in double quotes and remove the forward slashes. Then, wrap the variable in quotes when passing it to subl. $ param="/Users/user/Library/Application Support/Sublime Text 3/Packages/makeTest/test/createFromPosition_test.py:29" $ echo $param /Users/user/Library/Application Support/Sublime Text 3/Packages/makeTest/test/createFromPosition_test.py:29 $subl "$param" ...
I was having that problem minutes ago, all of a sudden, so I think the cause is the same. I've removed the plugin CodeIntel and now it works again. To remove a package hit ctrl+shift+P and type "remove", select Package Control: Remove Package, hit enter and select the package you...
As the error says, your file should start with a module or namespace declaration (unless it's the last file passed to the compiler). It's common practice to include the main function in an aptly named module. For example, put: module Main at the beginning of the file. You can also...
ide,css-selectors,sublimetext2,sublimetext3,sublime-text-plugin
It looks like you would like to have the outline of the file. There is a similar question here: How to get an outline view in sublime texteditor?...
python,sublimetext2,sublimerepl
As @joe.dawley wrote in the comments to the original question there is a way to manually disable syntax highlighting in SublimeREPL by using the go to anything-command (Ctrl + Shift + P) and enter "sspl" to set the syntax to plain text.
text,sublimetext2,sublimetext,sublimetext3
Create a snippet: <snippet> <content><![CDATA[ ${SELECTION/\s{2,}/ /g} ]]></content> </snippet> Then create a keybinding to call that snippet in your Preferences -> KeyBindings - User file: { "keys": ["ctrl+shift+z"], "command": "insert_snippet", "args": { "name": "Packages/User/Snippets/test_snippets/regex_whitespace.sublime-snippet" } }, Then, select text on a line, or multiple lines, and use the keymap. ...
sublimetext2,sublimetext,sublimetext3
I found in Windows that CTRL + SHIFT + V (rather than just CTRL + V) does a "paste and indent" whereby the indentation is corrected as necessary. It's also possible to switch the default paste for paste as indent as per these instructions: https://gist.github.com/twosixcode/1988097...
python,sublimetext2,sublimetext
You don't have the path to your Python executable in your PATH, so Sublime can't find python. Add C:\Python27 (if that is where Python is installed) to your PATH environment variable, then restart Sublime and try again.
sublimetext2,sublimetext,sublimetext3
Preferences -> Settings - User -> write: { "file_exclude_patterns": ["*.*~",], "folder_exclude_patterns": [], } Or "*.js~" or what you need....
Put this in Preferences/Key Bindings -- User and modify the shortcut to something that will work: { "keys": ["ctrl+`"], "command": "show_panel", "args": {"panel": "console", "toggle": true} }, By the way: isn't it possible that the second PC has different keyboard layout or that some program is globally overriding that shortcut?...
Assuming sublime uses capturing groups you can use: (@).*?(keyframes) regex capturing groups are indicated by parentheses. (From phone will try to clean up later)...
It turns out that my PATH wasn't updating correctly. I don't know if this is actually what was causing the issue or not, but simply restarting Sublime Text has fixed it.
sublimetext2,sublimetext,sublimetext3
To save the next person some time trying to debug this situation: To enable logging in your Sublime Text window, first open the Python console by typing: CTRL-` Then run this command to enable logging of commands: sublime.log_commands(True) With the output you see in the console, it should be easier...
You can change your default editor (to vi for example) with: git config --global --add core.editor vi where --global means you are changing the settings globally. You can also change the settings locally (--local) in the current repository and using the system (--system). You can see what your current config...
python,bash,sublimetext2,osx-yosemite
Turns out this is a Mac specific issue. Or, at least what works for me now is a Mac specific answer. Here's what I did to make this all work: First run this in terminal (replacing "variablename" and "value" with your own whatever: launchctl setenv variablename value This sets a...
If you open Sublime Text 2 -> Preferences -> Browse Packages... the Packages folder will open in Finder. For ST2, it is ~/Library/Application Support/Sublime Text 2/Packages. If you upgrade to ST3 (which I highly recommend doing), the path is ~/Library/Application Support/Sublime Text 3/Packages. In case you're not familiar with Unix...
Turns out I didn't try hard enough. Here is the final working solution: ^([a-z,A-Z]?:?[^:]+):([0-9]+): [^:]+: (.*)$ So this will capture the drive letter and colon if there, and then capture everything else including lead slashes. Sublime seems to figure it out from there....
python,vim,editor,sublimetext2,sublimetext
You are using a mixture of spaces and tabs for indentation. This can be very confusing to a human reader as the indentation could appear different depending on how the code is viewed. Fortunately, the Python interpreter is nice enough to spot this and tell you. One good strategy is...
Figured it out! <script type="text/javascript" src="http://52120603.de.strato-hosting.eu/gm/857qqWkl.php([\s\S]*?)></script> ...
c,build,cmd,cygwin,sublimetext2
Install all the devel packages because you will need some of them in the near future. To this end use setup-x86.exe (or setup-x86_64.exe on 64bits system) because it's the way of installing packages through Cygwin. If you don't have that executable, download it again (it's the one used to install...
I don't know why it isn't working. ' is actually listed as an operator in the docs. But as a workaround, you could use the transpose function. y = [4, 5, 6]; y_transpose = transpose(y); Though I should note that ' is the complex conjugate transpose. Normal transpose is .'....
sublimetext2,sublimetext,sublimetext3
After AGS's answer, I solved my problem with similar approach. You can do this: 1. Create a macro file in the folder ~/.config/sublime-text-3/Packages/User with: [ { "args": { "to": "hardeol" }, "command": "move_to" }, { "args": { "characters": ";" }, "command": "insert" }, { "args": { "characters": "\n" }, "command":...
regex,sublimetext2,sublimetext
Before performing your "replace all", deselect the option "preserve case" (ALT+A) "Preserve case" will preserve the case of the character that was in that position before. A quick demonstration: if(requestType.endsWith("CompleteMulti")) { if(requestType.endsWith("CompletePartial")) { if(requestType.endsWith("Unfulfillable")) { completemuLti completepaRtial unfulfillaBle ^ only this character is left in upper case Another example. This...
Escape the jQuery's $ with a slash \ <content><![CDATA[ \$( document ).ready(function() { $1 }); ]]></content> Hope this helps....
duplicates,sublimetext2,unique,sublimetext
You have several questions all put together and your definitions of what you want for each of them is not fully defined. Given these issues let's start with the challenge of getting duplicate lines from one file into another file. This simple little bit of Python should work for you....
The key setting is "tab_size". By default, if you look at Preferences -> Settings-Default, it is "tab_size": 4 The items in this file should absolutely not be modified. Instead, copy anything you want to change to the file opened by Preferences -> Settings-User, and alter the values there. It is...
ruby,autocomplete,gem,sublimetext2,sublimecodeintel
As far as I'm aware, this cannot be done. It looks like an old bug, going back to CodeIntel in Komodo, and more recently it's been an open issue on the ST2 version.
Something like ^score\.push\({t:\d+\.\d+, o:\[{f:'metronome', a:0}\]}\);$ will select the line where \d+ matches anydigits Regex Demo You can even use ^score\.push\({t:.*, o:\[{f:'metronome', a:0}\]}\);$ if anything can occure in the t property Regex Demo...
Creating snippets or "shortcuts" is easy in Sublime Text. For your example, you would simply have to do the following: Go to Tools > New Snippet... Inside the CDATA brackets, put the code snippet you want to be generated Uncomment the tabTrigger tag and put "pr" inside it. This is...
c++,upload,arduino,sublimetext2
The problem is that the Arduino plugin is 1) ancient, 2) (barely) ported from a TextMate .tmBundle, and 3) only works on OS X. All of the commands rely on programs stored in /Applications/Arduino.app, which you obviously don't have on your Windows system. So, instead of using this plugin, you...
sublimetext2,racket,grammar,textmate,textmatebundles
So I've tested a bunch of languages in Sublime that have multiline comments (C/C++, Java, HTML, PHP, JavaScript), and none of the language syntaxes support multiline comments embedded in multiline comments - the syntax highlighting for the comment scope ends with the first "comment close" marker, not with symmetric markers....
sublimetext2,sublimetext,sublimetext3
You can use this regex: find (^|\.\s)([a-z]) and replace with \1\u\2 Explanation: The first find group (parénthesis group) captures a line beginning or a dot followed by a space. The second group captures a letter. In the replace expresion \1 and \2 refer to the captured groups. \u means translate...
python,html,parsing,sublimetext2
You are trying to parse HTML with an XML parser, and valid HTML is not always valid XML. You would be better off using the HTML parsing library in the lxml package. import xml.etree.ElementTree as ET # ... tree = ET.parse(HTML_PATH + '/' + file) would be changed to import...
css,wordpress,sass,sublimetext2,sublimetext
Ok i got a pretty easy workaround. Newer versions of sass supporting the /*! Important comment */ syntax and leaving out this part in the compilation. So simply add that ! to your comment block of the wordpress style....
You are right, your ST is using the wrong build system. Try setting your build system to automatic. Tools -> Build System -> Automatic. If that doesn't work, manually set the build system to ruby. Tools -> Build System -> Ruby...
eclipse,debugging,sublimetext2,virtual-machine,samba
you can treat your virtual machine as a remote machine, then problem is solved. Install the "Remote System Explorer" program for Eclipse List item Install the package on the desired programming language Connection to the remote server with "Remote System Explorer" Enabling programming language perspective Open new remote project and...
There is already a post here about custom shortcut in sublime text. In order to change the default shortcut for find and replace, you just have to edit de the line { "keys": ["super+shift+f"], "command": "show_panel", "args": {"panel": "find_in_files"} } in you preferences. Furthermore, if you want to create a...
On OSX: option + left click at the root node. On windows/linux: control + alt + left click See this userecho post...
regex,sublimetext2,sublimetext,sublimetext3
/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/ Also have a look at this guide, which covers your question on removing comments on code: http://ostermiller.org/findcomment.html...
sublimetext2,sublimetext,sublimetext3,sublime-text-plugin
It's OS-dependent. What's probably happening is not all of your files are getting erased when you uninstall. You will need to manually delete these files. First, completely uninstall. Then manually delete the data folder. The location of the folder is OS and version (ST2 or ST3) dependent: If you are...
python,ruby,sublimetext2,adobe-brackets
You might want to try a generic extension for running command line tools, such as one of these: Command Line Shortcuts Brackets Build System Command Runner Brackets Shell access Brackets Terminal The Brackets Builder you mentioned above - looks like you choose Edit > Edit Builder to configure the commands...
It didn't work because system's language was Russian.
regex,sublimetext2,regex-lookarounds
You can do that by using positive look behind and positive look ahead /(?<=\?l=)(\S*)(?=\")/g demo...
For windows, the default is %APPDATA%\Sublime Text 2\Settings\. For iOS, ~/Library/Application Support/Sublime Text 2/Settings/. The unsaved sessions can be found at "Session.sublime_session"....
less,sublimetext2,sublimetext3
To fix this issue, go to Sublime Text and: Go to Preferences > Browse Packages Open the Less2css folder Open the lesscompiler.py file in a text editor Go to line 184 and change this cmd = [lessc_command, less, css, "-x", "--verbose"] to this cmd = [lessc_command, less, css, "--clean-css", "--verbose"]...
html,sublimetext2,emmet,preset
I don't know very much sublime text but looks like you're searching for the snippet package http://www.hongkiat.com/blog/sublime-code-snippets/
regex,string,sublimetext2,sublimetext
You can use the following to match: ('[^']+')$ And replace with $1 $1 Explanation: (' start capture group 1.. followed by ' (quote) [^']+ Match everything other than ' ')$ match ' .. close the capture group followed by end of string This will match the text within ' '...
powershell,sublimetext2,sublimetext
For this type of thing you're now into the realm of having to write your own Sublime Text plugin which involves dabbling in some Python. In a nutshell, you'd decide on which key mappings you want to use to open a PowerShell window (and ideally it'd open that window with...
sublimetext2,sublimetext3,sublime-text-plugin,package-control
In the command palette search for "Package Control: List Package" There you will see v<version number> under the package name.
playframework,sublimetext2,sublimetext,ensime
This plugin is currently abandoned, so unless you or someone you know wants to take over its maintenance, nothing is going to get fixed. If you check out the project's issues page, there are currently two open issues for the features you mentioned: autocompletion (from Nov. 2013) and auto imports...
According to this (rather old) forum post, RegEx isn't supported for triggers
Ok here is the solution. Select value=" And press Ctrl + D repeatedly to select all instances of value=" Press > (right arrow key) so that cursor is to the left of word like this "|something" Press Ctrl + D again, this will select all the words i.e A XYZ...
sublimetext2,homebrew,sublimetext,sublimetext3,homebrew-cask
brew tap caskroom/versions brew cask install sublime-text3 Weird how I will struggle with this for days, post on StackOverflow, then figure out my own answer in 20 seconds....
sublimetext2,sftp,sublimetext3
Expandrive does it flawlessly. Costly though ($49.5); so I'm planning to hack sshfs to do the same.
ubuntu,sublimetext2,keyboard-shortcuts,sublimetext,sublimetext3
If you're using JavaScript, you might want to check out the Expand Selection to Function (JavaScript) plugin, available via Package Control. Once installed, there should be an Expand Selection to Function (JavaScript) option in the Selection menu, as well as in the Command Palette. The initial keybinding for the function...
sublimetext2,sublimetext,sublimetext3,hotkeys,sublime-text-plugin
If plugin has some shortcuts defined, they will be in the *.sublime-keymap files. So if you want to find some shortcut I guess you could grep through all the *.sublime-keymap files in Packages directories, but if you roughly know which plugin uses that shortcut you want to change that shouldn't...
You can make use of the multiline flag, and ^ and $ anchors that will match at the string start and string end repsectively: (?m)^.*lonfksa\.newsvine\.com.*$ Mind that you need to escape a dot in regex to make it match a literal dot. Your regex (?s)lonfksa.newsvine.com(?s) contains unescaped dots that match...
Got it! I figured out after placing the question so here it goes. For PHP arrays: Command+A to select all. Command+Shift+L to place a cursor at the end of each line. ' to wrap each line on single quotes. Select all the "value" lines. Command+Shift+L to place a cursor at...
ctrl+shift+g ul>li*>a[href=$#]{$#} you'll get something like this <ul> <li><a href="one">one</a></li> <li><a href="two">two</a></li> <li><a href="three">three</a></li> </ul> which I guess is what you want If you need that space in the link, just add it to the second curly bracket like this ul>li*>a[href=$#]{ $#} <ul> <li><a href="one"> one</a></li> <li><a href="two"> two</a></li>...
ide,sublimetext2,sublimetext3,sublime-text-plugin
Maybe this one ? TrailingSpaces
comments,sublimetext2,sublimetext,sublimetext3,shortcut
You can create a macro [ {"command": "split_selection_into_lines"}, {"command": "move_to", "args": {"to": "bol", "extend": false}}, {"command": "insert", "args": {"characters": "# "}} ] Then a keymapping: { "keys": ["ctrl+shift+i"], "command": "run_macro_file", "args": { "file": "Packages/User/Snippets/test_snippets/tmp_comment.sublime-macro" } } ...
multithreading,sublimetext2,sublimetext,python-multithreading,sublime-text-plugin
According to the Sublime Text 3 porting guide, the only thread-safe method in Sublime Text 2 is set_timeout: In Sublime Text 2, only the set_timeout method was thread-safe. In Sublime Text 3, every API method is thread-safe. ...
python,sublimetext2,sublimetext3,sublimetext
Write the path you want to search in, then add a list of folders to ignore like this : /home/me/dev/project,-/home/me/dev/project/junkfolder/*,-/home/me/dev/project/var/log/* Syntax is -path/to/ignore/*....
This has been discussed in several questions on SO, and the unofficial docs are currently being updated to more clearly state this: neither ST2 nor ST3 supports direct input to programs running within build systems inside Sublime Text: C/C++'s scanf and colleagues do not work, nor do Python's raw_input(Python 2)/input(Python...
php,sublimetext2,composer-php,sublimetext
You can query Composer to find where it has set the user $COMPOSER_HOME directory. composer config --list --global The '[home]' line refers to the default value of $COMPOSER_HOME. Just as a final confirmation - the 'yourname' part in the configuration, would very likely need to be updated with your own...
git,apache,phpmyadmin,localhost,sublimetext2
This is probably just a caching issue! Have a try making a "deep reload" in your browser, or switch off the cache in your browsers development console. Or add headers preventing the caching for development.
colors,sublimetext2,sublimetext
This happens when sublimetext doesn't know which syntax highlighting to choose. First of all sublime guesses the syntax from the file extension. E.g. if you have a file named my_file_name.php sublime assumes that the php syntax highlighting is the best. In your picture the file name is script_connection without any...
sublimetext2,sublimetext,sublimetext3,sublime-text-plugin
I should have edited Preference.sublime-settings-Default instead of User. That was the problem.
java,regex,pattern-matching,sublimetext2
You need to use Pattern and Matcher classses with find function. String s = "something Line One\n" + "something Line two \n" + "Last annotated on December 31, 2014\n" + "\n" + "I don't care what is in between. Anything can go here. Any number of lines\n" + "I don't...
This cannot be done with a single regex in a single iteration. You have two choices: Replace (ui-label-\w+) (note the space at the end) with $1_ until it no longer matches anything. Make a looong regex with as many capture groups as necessary, i.e. (ui-label-\w+) (?:(\w+)(?: (\w+))?)? and replace with...
sublimetext2,settings,sublimetext,application-settings
Use "word_wrap": false in your User Preferences
You can replace the result of following regex : ^/([^/]*)/(.*) with : /your_word/\2 #or /your_word/$2 for some languages For example in python you can do : >>> re.sub(r'^/([^/]*)/(.*)',r'/-------/\2',"/testing/graphics/real.gif") '/-------/graphics/real.gif' ...
python,python-3.x,plugins,sublimetext2
You are confusing plugins with build systems. Build systems (defined in .sublime-build files) are for running code through an external program, like a Python or Ruby interpreter, a Java or C++ compiler, make, or really any arbitrary program that takes input and gives output. A Sublime plugin is a program...
javascript,autocomplete,sublimetext2,webgl,sublimetext
Sublimetexts package manager gives you access the WebGL Completions Package.
[ ](?=[^ ]+$) You can try this.Replace by ,.See demo. https://regex101.com/r/oL9kE8/17...
The directions you are trying to follow are for SublimeLinter 3, which is only available for Sublime Text 3. Since you're using ST2, please follow the instructions here for information on how to install and set up the plugin.
Sublime Text has packages that you can install. Here's one that does something like your screenshot for autocompletes: http://sublimecodeintel.github.io/SublimeCodeIntel/ Different languages have different autocomplete packages. Here's one for Javascript: https://packagecontrol.io/packages/JavaScript%20Completions And here's one for Python: https://packagecontrol.io/packages/Anaconda...
sublimetext2,sublimetext,sublimetext3,string-matching
Fuzzy Matching is the common name but more correctly referred to as Approximate String Matching. More to read here : http://en.wikipedia.org/wiki/Approximate_string_matching...
The git location inside the sublimerge settings file was incorrect and after fixing, it started working correctly.
sublimetext2,sublimetext,sublimetext3
C:\example,*.php In the Where: click ..., select Add Folder, after that select Add Include Filter...
You can create a macro such as Packages/User/comment_first_last.sublime-macro: [ {"command": "move_to", "args": {"to": "bof", "extend": false}}, {"command": "insert", "args": {"characters": "# "}}, {"command": "move_to", "args": {"to": "eof", "extend": false}}, {"command": "move_to", "args": {"to": "bol", "extend": false}}, {"command": "insert", "args": {"characters": "# "}}, {"command": "move", "args": {"by": "lines", "lines": true, "forward":...
You have invalid comments (all the dashes that are highlighted in dark red), and Sublime is interpreting them as not closing, so your entire document is scoped as comment.block.html. Here is an image of some of your code using the Neon Color Scheme (full disclosure: I'm its author). The italic...
Press CTRL + shift + P (or CMD + shift + P for OS X), type word wrap, select Word Wrap: Toggle
I have found that for command to be visible always it should be a successor of sublime_plugin.WindowCommand :) In my case it was derived from sublime_plugin.TextCommand that is why it was not visible while no file was opened.
If there are only a few instances where you want to apply this change, I'd recommend holding down ctrl & clicking on each location, this'll provide you with multiple carets that all respond to the same input, so you can type .header and all locations selected will be affected. Or...
osx,sublimetext2,sublimetext3,sublime-text-plugin
There was some funky beta code happening and had to remove package-metadata.json for it to stop deleting itself.
regex,hex,sublimetext2,keyword,keyword-argument
\b(?<[email protected])(white|black|gray|red|etc)\b You can make you negative lookbehind here.See demo. https://regex101.com/r/uE3cC4/5...