sublimetext3

Why SublimeREPL won't import a Python module or read a file in CWD?

别等时光非礼了梦想. 提交于 2019-12-18 09:43:22
问题 I'm using Sublime Text 3 build 3126 on Ubuntu Zesty with the SublimeREPL plugin. I open a Python REPL with CTRL+SHIFT+P >> SublimeREPL: Python and send a file to REPL with CTRL+, , F and evertyhing works as long as I work on a single Python script file. As soon as I try to move some parts of my code to another module and import it in the main file, I get the nasty ImportError: No module named error. Trying to open a text file located in the same directory with: codecs.open('filename',

How to not highlight object keys such as 'do'/'package' as keywords in Sublime?

▼魔方 西西 提交于 2019-12-18 09:36:55
问题 I'm using Sublime Text 2/3 to code in Typescript and Javascript. But when the key of an object is also a valid keyword name, it gets highlighted like a keyword even though it is only a key in that case. Example: var test = { do: 'hello world' }; Is there a way to not highlight this kind of key as a keyword would? 回答1: The syntax highlighting is controlled by the tmLanguage file. In ST3 these are held in .cache files. So follow these steps. Open Tools -> Command Pallet and Using Package

How to edit Sublime Text 3 Soda Theme

馋奶兔 提交于 2019-12-18 04:35:19
问题 I installed the Soda Theme on Sublime Text 3 on OSX and I was wondering where are the actual files and folder to the theme that way I could look at the theme file and make my own edits to it, along with I would like to adjust a few of the images used in the theme. On the Git documents it says if you are to manually install Soda on Sublime you place the soda folder in the package directory, although when I install Soda via Control Package I don't see the Soda theme in package directory. 回答1:

delete U+200B zero-width space characters using sublime text 3

假如想象 提交于 2019-12-18 02:55:25
问题 How can I make U+200B character or delete them in using sublime text 3. I found http://pastebin.com/ehWxNfMe but I am not sure how to use it 回答1: The following will work in Sublime Text 2 and 3. However, due to some issues discussed later, it has the potential to block the program when editing large files, and/or on slow computers. A Sublime Text 3-specific version using an asynchronous method is at the bottom. Open a new file in Sublime, and set its syntax to Python. Paste the following into

Search for multiple strings in several files with Sublime 3

∥☆過路亽.° 提交于 2019-12-17 23:06:08
问题 I know how to search for a single string in several files at once with Sublime 3 (explained here). What I need to do is to search for multiple strings in several files. I've tried going to Find in files and setting: Field: string1 \& string2 Where: /path_to_folder_containing_the_files_I_want_to_ search/ (where string1 and string2 are the strings I want to search for) but that doesn't seem to work. Can this be done at all? 回答1: Just came across this old question and thought I'd add my solution

Latex Sublime snippet

我是研究僧i 提交于 2019-12-17 20:41:11
问题 I'm using a Sublime snippet to create a Latex state machine template. However, it does nothing (when I type "stmach" and press tab, stmach disappears but the Latex code isn't included). I don't understand why, as all my other snippets are working fine. If I remove some lines in the snippet, it works, but I need the whole block :/ <snippet> <content><![CDATA[ \begin{center} \begin{tikzpicture}[shorten >=1pt,node distance=4.5cm,on grid,auto] \tikzstyle{every state}=[draw=blue!50,very thick,fill

Sublime Text 3 System Package Location?

馋奶兔 提交于 2019-12-17 20:32:17
问题 Where are system packages located in ST3? I'm well aware of these two: ~/Library/Application Support/Sublime Text 3/Packages ~/Library/Application Support/Sublime Text 3/Installed Packages But I can't find where packages such as HTML or PHP are located. These are system packages that I want to edit. I've seen a number of articles suggesting that I copy the default package, let's say the HTML package for example, to my 'Packages' directory and edit it how I like. I just can't find the package

Sublime Text different syntax for files under a specific subdirectory

本小妞迷上赌 提交于 2019-12-17 20:28:18
问题 Is there a way to make Sublime Text use a different syntax hilighting plugin for files inside a specific directory tree? E.g. By default I want to use the default Javascript file type for .js files, but for files under ~/Unity/ folder I want to use Unity3d-Javascript file type. 回答1: Check out the ApplySyntax package. This is a very powerful plugin that allows you to apply arbitrary regexes to several different aspects of a file (file name, contents, first line, suffix, etc.) and then assign a

How to compile and run C in sublime text 3?

拟墨画扇 提交于 2019-12-17 15:26:23
问题 I would like to compile and run C program in sublime text 3 on ubuntu 14.04. Currently the program is being compiled with gcc using sublime text 3 executing a command (see below code), but I was wondering if it's possible to have the program execution output to appear on sublime text console as well. Here's what I currently have to compile C program with sublime text 3 c_compile.sublime-build { "cmd" : ["gcc", "$file_name", "-o", "${file_base_name}"], "selector" : "source.c", "shell":false,

Search in all files in a project in Sublime Text 3

坚强是说给别人听的谎言 提交于 2019-12-17 15:04:13
问题 Is there a way to search for a string in all files inside a project in Sublime Text 3? The string is not a method. 回答1: You can search a directory using Find → Find in files . This also includes all opened tabs. The keyboard shortcut is Ctrl ⇧ + F on non-Mac (regular) keyboards, and ⌘ ⇧ + F on a Mac. You'll be presented with three boxes: Find , Where and Replace . It's a regular Find/Find-replace search where Where specifies a file or directory to search. I for example often use a file name