sublimetext3

Highlight the jQuery $ variable in Sublime Text 3 (build 3103)

只愿长相守 提交于 2019-12-02 07:48:42
In Feb 2016, the update to build 3103 broke a custom theme of mine, mostly in regard to Javascript. I really miss the ability to target the $, it seems that it's now under the scope: meta.function-call.with-arguments.js variable.function.js when modifying the theme. I want to know if there's a way to bypass or over-rule the $ sign, perhaps some REGEX or a way to add scope into the .tmLanguage file, so that I may color it differently from other "variable functions". Until the unpaid/non-dev Sublime Text 3 is updated >= build 3106, follow these instructions to theme your $ variable in JavaScript

Sublime Text 3, rbenv, TestUnit, RubyTest and Spring correct configuation to get tests working

◇◆丶佛笑我妖孽 提交于 2019-12-02 05:44:10
So I've setup RubyTest / Sublime Text 3 and that works fine. I'm having trouble getting spring to work in RubyTest. There is this cryptic setting: "check_for_spring": false, But when I set to true and run a test it just gives me the default spring command output e.g: Version: 1.1.3 Usage: spring COMMAND [ARGS] Commands for spring itself: If I follow info on this url ( https://github.com/rails/spring ), correct way to call a test is? bin/rake test test/functional/posts_controller_test.rb Now my current settings for test running are: "run_ruby_unit_command": "ruby -Itest {relative_path}", "run

Regex to match a string with specific start/end

社会主义新天地 提交于 2019-12-02 05:34:39
I'm trying to match all occurrences of strings starting with -- and ending with a single space . The file I'm handling is the OpenVPN manual and I want all options mentioned (e.g. --option ). I'm working with Sublime Text and according to its cheatsheet they support \A and \Z to denote start and end of strings. Thus, I thought \A--.* \Z should match all strings, starting with -- and ending with . However, this doesn't match anything at all. What regex would match all strings, starting with a double dash and ending with a space character? Any occurrence, independent of its position should be

Delete all text but matches in SublimeText

柔情痞子 提交于 2019-12-02 02:15:42
问题 I am trying to delete all strings except emails in sublime. So i can look for emails like this [a-zA-Z0-9.!#$%&'+-/=?\^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[\.a-zA-Z0-9-]+) But how do i delete everything else? Thanks 回答1: You may do the following: Use your regex to find all emails, click Find All to select all emails Go to Selection and click Invert Selection Press Enter to add line breaks between the found emails. Or, press , or any other key to insert anything to delimit found matches. 来源: https:/

Sublimetext 3 resolution render issue (colorful tabs) on new update

ε祈祈猫儿з 提交于 2019-12-02 02:05:11
After updating to the latest version of sublimetext (3.0, 3143), it rendered this output: Note: my theme is the default theme. Is there anyway to fix it? The theme you are using is referencing old images that are no longer part of the Default theme. You should probably open the command palette and run "Select Theme" to use either Default or Adaptive. Alternatively you can use a third-party theme: https://packagecontrol.io/search/theme?sort=popularity . Actually this problem in my case refers to the customized theme . I've removed my customized theme from "[Browse Packages]/User/Default.sublime

Save html locally from Devtools

扶醉桌前 提交于 2019-12-02 01:35:04
问题 I am using Emmet Livestyle with Chrome and Sublime text editor. I am editing my files locally and can update my css and js from the devtools so that those changes are reflected at the same time in my local files too. But how can I update my html code too? 回答1: We cannot persist HTML edits back. Because, well, you aren't editing HTML. Here is what is going on... The server sends Chrome the page (HTML.) This is taken, tokenized, then a DOM (Document Object Model) is constructed out of it. The

Delete all text but matches in SublimeText

馋奶兔 提交于 2019-12-02 00:17:41
I am trying to delete all strings except emails in sublime. So i can look for emails like this [a-zA-Z0-9.!#$%&'+-/=?\^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[\.a-zA-Z0-9-]+) But how do i delete everything else? Thanks You may do the following: Use your regex to find all emails, click Find All to select all emails Go to Selection and click Invert Selection Press Enter to add line breaks between the found emails. Or, press , or any other key to insert anything to delimit found matches. 来源: https://stackoverflow.com/questions/52450052/delete-all-text-but-matches-in-sublimetext

Python 2.7 build on Sublime Text 3 doesn't print the '\uFFFD' character

谁说胖子不能爱 提交于 2019-12-01 22:44:48
问题 The problem. I'm using Python 2.7 build on Sublime Text 3 and have an issue with printing out. In some cases I get a pretty confusing output for '\uFFFD' - the 'REPLACEMENT CHARACTER' . For example: print u'\ufffd' # should be '�' - the 'REPLACEMENT CHARACTER' print u'\u0061' # should be 'a' ----------------------------------------------------- [Finished in 0.1s] After inversion of the order: print u'\u0061' print u'\ufffd' ----------------------------------------------------- a � [Finished

Change Sublime Text 3 Sidebar Width

倖福魔咒の 提交于 2019-12-01 21:17:17
I wanted to know if it is possible to change the sidebar width in ST3? Is this a project based, theme based, or something in settings? I did not see in default settings so that is why I brought the question here. Thank you. To resize the sidebar, all you need to do is click and drag: There is no way to set a "default" size in your user preferences, project, or current theme, unfortunately. 来源: https://stackoverflow.com/questions/26933683/change-sublime-text-3-sidebar-width

Sublime text: Merge multiple adjacent white spaces into one

。_饼干妹妹 提交于 2019-12-01 21:13:04
How to do this in sublime text "aaa bbb ccc ddddddd " should get converted to "aaa bbb ccc ddddddd " 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. This can also be done with a regex search and replace. First, select the text you want to