sublimetext

Python Unicode strings and the Python interactive interpreter

走远了吗. 提交于 2019-12-18 17:33:08
问题 I'm trying to understand how python 2.5 deals with unicode strings. Although by now I think I have a good grasp of how I'm supposed to handle them in code, I don't fully understand what's going on behind the scenes, particularly when you type strings at the interpreter's prompt. So python pre 3.0 has two types for strings, namely: str (byte strings) and unicode , which are both derived from basestring . The default type for strings is str . str objects have no notion of their actual encoding,

Merging files in Sublime with Sublimerge via command line

久未见 提交于 2019-12-18 14:55:27
问题 I'm trying to find a better merge file option and wanted to try out Sublime as of my work is done using it. so I installed Sublimerge and now am stuck. I know I can compare two already open files or compare via the Sidebar but what I want to do is fire it off via the command line so I can kick it off from our source control program like I can with every other merge tool I've seen. Does anyone know the command line format to do this? N.B. - I've long since given up trying to use sublime to

Sublime SFTP - Upload compiled css when sass file saved

限于喜欢 提交于 2019-12-18 11:17:17
问题 I'm developing html/css in Sublime. I'm writing my css with sass and using Sublime's build system to generate the css file on file save. It's also configured to upload on save using the SFTP plugin. My problem is that the generated css file doesn't get uploaded as that isn't the file I've directly saved. I've tried to see if there is a way for the SFTP plugin to upload all files that have been modified locally, but it doesn't seem to support that. Is there anything I can do to achieve this?

Find closing HTML tag in Sublime Text

谁都会走 提交于 2019-12-18 09:55:47
问题 I have a very long and very nested HTML document, where I need to quickly find the closing tag. How can I do this? 回答1: Try Emmet plug-in command Go To Matching Pair : http://docs.emmet.io/actions/go-to-pair/ Shortcut (Mac): Shift + Control + T Shortcut (PC): Control + Alt + J https://github.com/sergeche/emmet-sublime#available-actions 回答2: There is a shortcut ( Ctrl + Shift + A for Windows and Linux users, Command + Shift + A for Mac users) to select the whole block within the currently

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

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

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 run programs in an external console with Sublime Text in Windows system?

泪湿孤枕 提交于 2019-12-17 15:53:09
问题 I managed to configure Sublime Text 2 for C++ and I can now compile my code (using the MinGW compiler). Unfortunately, the Sublime Text console can't support any kind of input for C++. I want to open my compiled program in an external console (Window's terminal for instance). I tried to use "call" or "cmd" but couldn't make it work. (it still opens the file in the console) Here's my build configuration: { "cmd": ["C:\\MinGW\\bin\\mingw32-g++.exe", "-Wall", "-time", "$file", "-o", "$file_base

Sublime Text - C++ Highlight

大城市里の小女人 提交于 2019-12-17 15:51:53
问题 How can i make my class be highlighted as a normal primitive type like the int or double? See a exemple: I want that when i declare the Test aloha; Test be highlighted of the same way that int a . 回答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 Manager install PackageResourceViewer In the Command Pallet select PackageResourceViewer: Open Resource In the presented