sublimetext3

Convert - -(double dash) to -> automatically in SublimeText 3

社会主义新天地 提交于 2021-02-08 12:02:29
问题 During my work I use -> many times and on a hungarian keyboard there is no dedicated > button, so I have to use 3 keys to enter this and sometimes I also misstype. Is there a way to convert -- (double dash) automatically a ->? Snippet is not so good because it requires a TAB to convert. Thanks 回答1: It's possible to do this with a simple key binding such as the following: { "keys": ["-", "-"], "command": "insert", "args": { "characters": "->" }, }, Now when you type -- as soon as you hit the

Sublime Text 3 Multiline Method Folding

断了今生、忘了曾经 提交于 2021-02-07 14:29:24
问题 SO... Sublime Text has the built in ability to fold methods, but as soon as the method declaration spans multiple lines it loses this ability. Does anyone know about a plugin or a way to make this work? Specifically I am running into this with ruby (and my team adheres to a strict style guide regarding line length), but the language shouldn't matter. 回答1: Instead of clicking on the down arrow that appears in the gutter next to the first line of the function definition, all you need to do is

Sublime Text 3 Multiline Method Folding

白昼怎懂夜的黑 提交于 2021-02-07 14:21:11
问题 SO... Sublime Text has the built in ability to fold methods, but as soon as the method declaration spans multiple lines it loses this ability. Does anyone know about a plugin or a way to make this work? Specifically I am running into this with ruby (and my team adheres to a strict style guide regarding line length), but the language shouldn't matter. 回答1: Instead of clicking on the down arrow that appears in the gutter next to the first line of the function definition, all you need to do is

Sublime Text Cancel Current Run Hotkey

谁说胖子不能爱 提交于 2021-02-07 04:34:06
问题 In Sublime Text, when I press Ctrl+B , it runs my application. Is there a hotkey to force it to stop running? I'm debugging some code that often hangs, and Sublime Text ends up completely hanging. I'd like to know what hotkey I can press to stop this. 回答1: Ctrl Break (Windows/Linux) will cancel a build that is in progress. There is no default key binding for OS X, but you can create your own if you wish. Navigate to Sublime Text -> Preferences -> Key Bindings - User and add the following: {

Sublime Text 3: Anaconda package error connection to localhost timed out

十年热恋 提交于 2021-02-06 10:52:07
问题 I am getting a bizarre error message when starting up sublime text 3. upon startup, I get the error below. Here's some background on my system: Windows 10 Sublime Text 3 (Anaconda Package installed through Sublime Text package installer) From CMD: C:\Users\joshu>where python C:\cygwin64\bin\python C:\Users\joshu\Anaconda3\python.exe C:\Users\joshu>which python /usr/bin/python C:\Users\joshu>python --version Python 3.5.2 :: Anaconda 4.2.0 (64-bit) From sublime text 3 console: sys.version '3.3

Sublime Text regex to find and replace whitespace between two xml or html tags?

≯℡__Kan透↙ 提交于 2021-02-04 15:15:46
问题 I'm using Sublime Text and I need to come up with a regex that will find the whitespaces between a certain opening and closing tag and replace them with commas. Example: Replace white space in <tags>This is an example</tags> so it becomes <tags>This,is,an,example</tags> Thanks! 回答1: This will find instances of <tags>...</tags> with whitespace between the tags (<tags>\S+)\W(.+</tags>) This will replace the first whitespace with a comma \1,\2 Open Find and Replace [OS X Cmd+Opt+F :: Windows

internal error in mingw32_gt_pch_use_address, at config/i386/host-mingw32.c:190: MapViewOfFileEx: Attempt to access invalid address

空扰寡人 提交于 2021-01-29 16:29:42
问题 internal error in mingw32_gt_pch_use_address, at config/i386/host-mingw32.c:190: MapViewOfFileEx: Attempt to access invalid address. I get this error while compiling a c++ program in sublime-text 3. How to resolve this error? 来源: https://stackoverflow.com/questions/61916030/internal-error-in-mingw32-gt-pch-use-address-at-config-i386-host-mingw32-c190

Can't get Xdebug to work with Sublime Text 3

我的梦境 提交于 2021-01-29 04:14:07
问题 I'm using Nginx and PHP 5.5.29 (with php-fpm), installed xdebug through package control. This is my xdebug config in php.ini zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so xdebug.remote_enable = 1 xdebug.remote_handler = dbgp xdebug.remote_host = "127.0.0.1" xdebug.remote_port = 9000 xdebug.remote_log = "/var/log/xdebug/xdebug.log" xdebug.var_display_max_depth = 5 xdebug.var_display_max_data = 2048 This is the sublime text project's configuration: {

Sublime Text set key binding for Tools > Babel > Babel Transform

一世执手 提交于 2021-01-28 13:00:45
问题 I want to create a key binding in Sublime Text 3 for the command Tools > Babel > Babel Transform . I have used the menu item Preferences > Key Bindings to open the user keymap, and I have added this line: { "keys": ["ctrl+shift+b"], "command": "babel_transform" }, However, pressing Ctrl-Shift-B has no effect. If I use a different command (such as "prompt_open_folder" ), the key binding words correctly, so I assume that it is the "babel_transform" command which I have got wrong. How should I

Auto-run a command on saving in Sublime Text

别说谁变了你拦得住时间么 提交于 2021-01-28 05:42:34
问题 Is it possible to run eslint automatically when I save either a .js or .jsx file in Sublime Text? I'm using the ESLint sublime package right now but I have to manually run it each time using Cmd + Option + e . Thanks! 回答1: Yes this can be done with a simple event driven plugin like the one I've written below. The plugin has been tested but not with the eslint command since I did not want to install that package. Clearly any command could be run instead of eslint in the plugin's run_command(