sublimetext3

easy SublimeText question regarding pygame module

谁说我不能喝 提交于 2020-01-16 08:07:10
问题 I've been using SublimeText on OSX without issue... until I tried to import pygame. A simple few lines of code like: print("Hello") import sys import pygame gets the following output: Hello Traceback (most recent call last): File "/Users/andrewjmiller/Desktop/python_work/new_file.py", line 5, in <module> import pygame ImportError: No module named pygame [Finished in 0.0s with exit code 1] [shell_cmd: python -u "/Users/andrewjmiller/Desktop/python_work/new_file.py"] [dir: /Users/andrewjmiller

regex match number after (

安稳与你 提交于 2020-01-15 03:03:10
问题 I am trying to use regex to match a a variable length of digits after the open bracket '(' character. I have tried \(\d+ But that regex includes the bracket in the match. How do I exclude it? I am using sublime text regex engine to do the match. 回答1: You may use a positive lookbehind: (?<=\()\d+ There is one limitation here : you can only have a pattern of known width in the lookbehind. You may use (?<=\(|\s{5})\d+ , but you cannot use (?<=\d:\s*)\d+ . You may use \K "match reset" operator to

How to use JUnit with Sublime Text 3

吃可爱长大的小学妹 提交于 2020-01-14 19:11:17
问题 This is a two part question. I'm trying to use JUnit for a project I'm working on in Sublime Text 3. The file setup I have looks somewhat like this Vulcan/ Vulcan.sublime-project bin/ ... src/ core/ org/ vulcan/ geom/ Vector.java ... (other similar files in the same package) tests/ org/ vulcan/ geom/ VectorTest.java ... (relevant test files to match core/org/vulcan/geom/) At the top of Vector.java and VectorTest.java , I have the line package org.vulcan.geom . Now, in my sublime-project file,

How to use JUnit with Sublime Text 3

强颜欢笑 提交于 2020-01-14 19:10:33
问题 This is a two part question. I'm trying to use JUnit for a project I'm working on in Sublime Text 3. The file setup I have looks somewhat like this Vulcan/ Vulcan.sublime-project bin/ ... src/ core/ org/ vulcan/ geom/ Vector.java ... (other similar files in the same package) tests/ org/ vulcan/ geom/ VectorTest.java ... (relevant test files to match core/org/vulcan/geom/) At the top of Vector.java and VectorTest.java , I have the line package org.vulcan.geom . Now, in my sublime-project file,

Configuring Sublime 3 to Build TypeScript

天大地大妈咪最大 提交于 2020-01-14 03:05:08
问题 I am following the AngularJS start guide using Sublime. When I try to compile, I get the following error: /Users/Audrey/MyDev/node/07tsdemo/app.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. /Users/Audrey/MyDev/node/07tsdemo/app.ts(4,1): error TS1205: Decorators are only available when targeting ECMAScript 5 and higher. /Users/Audrey/MyDev/node/07tsdemo/app.ts(11,7): error TS1219: Experimental support for decorators is a feature that is subject to change

How to change the preferred encoding in Sublime Text 3 for MacOS

杀马特。学长 韩版系。学妹 提交于 2020-01-13 11:43:32
问题 I want to change the preferred encoding from US-ASCII to UTF-8 in Sublime Text 3 on Yosemite. The preferred encoding in the bash is set to UTF-8 so when python is run in the terminal: import locale print(locale.getpreferredencoding()) the output is: UTF-8 When the same code is run in Sublime Text, the output is US-ASCII . Setting in the build system for Python 3: "encoding": "UTF-8" or "env": {"PYTHONIOENCODING": "utf-8} has not helped. How can the setting be changed permanently so that I don

Global Python packages in Sublime Text plugin development

孤街浪徒 提交于 2020-01-13 11:28:10
问题 1. Summary I don't find, how Sublime Text plugins developer can use Sublime Text find global Python packages, not Python packages of Sublime Text directory. Sublime Text use own Python environment, not Python environment of machine. Developers needs sys.path for set not built-in Sublime Text Python packages. Is any methods, that use global installed Python packages in Sublime Text plugins? For example, it would be nice, if someone tells me, how I can change my plugin — see 3.2 item of this

In Sublime Text 3, can I send a selection of a do file to Stata?

六月ゝ 毕业季﹏ 提交于 2020-01-13 09:54:29
问题 This SO question led me to try Sublime Text 3 as a replacement for Stata's do file editor on Linux (full instructions here). Syntax highlighting works and a Ctrl+B shortcut sends the whole do file to Stata. Is there a way to send only a selection of lines to Stata? 回答1: Yes you can. First you need to find the name of the python function that does it. For the SublimeStata Enhanced package , it corresponds to the function text_2_stataCommand in the file text_2_stata.py. Second, you need to add

In Sublime Text 3, can I send a selection of a do file to Stata?

旧城冷巷雨未停 提交于 2020-01-13 09:54:25
问题 This SO question led me to try Sublime Text 3 as a replacement for Stata's do file editor on Linux (full instructions here). Syntax highlighting works and a Ctrl+B shortcut sends the whole do file to Stata. Is there a way to send only a selection of lines to Stata? 回答1: Yes you can. First you need to find the name of the python function that does it. For the SublimeStata Enhanced package , it corresponds to the function text_2_stataCommand in the file text_2_stata.py. Second, you need to add

In Sublime Text 3, can I send a selection of a do file to Stata?

天大地大妈咪最大 提交于 2020-01-13 09:54:05
问题 This SO question led me to try Sublime Text 3 as a replacement for Stata's do file editor on Linux (full instructions here). Syntax highlighting works and a Ctrl+B shortcut sends the whole do file to Stata. Is there a way to send only a selection of lines to Stata? 回答1: Yes you can. First you need to find the name of the python function that does it. For the SublimeStata Enhanced package , it corresponds to the function text_2_stataCommand in the file text_2_stata.py. Second, you need to add