问题标签 [sublimetext]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
5 回答
67038 浏览

development-environment - 如何在 sublime texteditor 中获得大纲视图?

如何在Windows的sublime 文本编辑器中获得大纲视图?

小地图很有帮助,但我错过了一个传统的大纲(我的代码中所有函数的可点击列表,按它们出现的顺序排列,以便快速导航和定位)

也许有一个插件,插件或类似的?如果您能简短地指出哪些步骤是使其工作所必需的,那也很好。

在崇高的文本论坛上有这个问题的副本。

0 投票
3 回答
4966 浏览

python - Python Unicode strings and the Python interactive interpreter

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, they are just bytes. Either you've encoded a unicode string yourself and therefore know what encoding they are in, or you've read a stream of bytes whose encoding you also know beforehand (indeally). You can guess the encoding of a byte string whose encoding is unknown to you, but there just isn't a reliable way of figuring this out. Your best bet is to decode early, use unicode everywhere in your code and encode late.

That's fine. But strings typed into the interpreter are indeed encoded for you behind your back? Provided that my understanding of strings in Python is correct, what's the method/setting python uses to make this decision?

The source of my confusion is the differing results I get when I try the same thing on my system's python installation, and on my editor's embedded python console.

0 投票
2 回答
1141 浏览

python - 在 Python 和 Sublime Text 中定义 todo 关键字

我可以定义#@TODO或类似的东西作为要在 Python 中突出显示的关键字吗?

这是特定于文本编辑器还是特定于语言/平台?

0 投票
2 回答
13819 浏览

macos - 如何添加 Sublime Text 2 键绑定?

我希望将以下分配给键绑定。我可以为此制作一个片段,但希望能够像在 Textmate 中一样CTRL+ 。>

我需要添加什么以及我需要在哪里添加它,或者我在哪里可以找到。

0 投票
3 回答
42639 浏览

python - sublime 文本编辑器使用什么 gui 库?

我已经下载了sublimetext的编辑器,我想知道其中使用了什么 GUI 库。

编辑器可执行文件目录中的文件的文件名是:

我可以从文件名中找到信息吗?

0 投票
1 回答
4004 浏览

build-script - Sublime Text 2 和 HTML5 样板构建脚本

在爱上了 Sublime Text 之后,我现在正准备离开 Aptana。ST2 似乎有一个内置的构建功能。如果我转到“工具”->“构建系统”->“新构建系统”,我可以定义自己的构建命令,但我可以告诉 ST2 使用来自 HTML5 样板的构建脚本吗?这样当我按 F7 或 ctrl+B 时,它就会从那里构建。

0 投票
1 回答
317 浏览

plugins - 如何向 Sublime Text 2 添加功能?

我最近发现了这个Sublime Text编辑器,因为我喜欢用它编写代码,所以我想向它添加更多自定义功能。

是否可以使用一些脚本语言来增强其核心功能?我在主文件夹中找到了一些 python 引用,但在官方网站上的文档中没有找到任何有用的东西。我猜编辑器是用 Python 编写的?

到目前为止,我只设法添加了自定义片段,但这不是我想要的。

有什么帮助吗?

0 投票
1 回答
10919 浏览

html - Sublime Text 2 的图像源完成

首先,我不完全确定这是否适合stackoverflow,或者应该放在程序员或超级用户中。如果我发布到错误的页面,我很抱歉。

对于这个问题:

例如,在 Aptana Studio 中,-tags的src-attribute有一个非常好的特性。<img>输入 src-attribute 时,autocomplete-contextmenu 中会显示一个目录列表,因此您可以直接选择图像文件并将路径插入到属性中。

这就是我的意思:

Aptana 图像源

有什么办法,插件或类似的东西,所以我可以把这种行为融入 Sublime Text 2?最好为 HTML 标记和 CSS 背景图像工作?

编辑:同时我在崇高的userecho上发布了这个,也许会出现一些事情。我会不断更新这个问题。

崇高的用户回声

0 投票
2 回答
30610 浏览

phpdoc - Sublime Text 2 评论/文档块

最近,我决定尝试使用 Sublime Text 2 作为 TextMate 的替代品(确实如此)。我非常喜欢它,但唯一困扰我的问题是它不会在按下“Enter”后继续 PHP 注释/文档块。

它只是添加新的空白行而不是以“*”开头的行,如此处所示http://cl.ly/AFcP/o

有针对这个的解决方法吗?我尝试为它做一个键绑定,但它对我来说太复杂了,特别是因为我对编辑器没有太多经验。

提前致谢。

0 投票
5 回答
5489 浏览

objective-c - 在 Sublime Text 2 中获取 Cocoa 方法完成

过去几天我一直在玩 Sublime Text 2,想知道是否有人已经成功地让 Cocoa 方法完成工作了?那里有插件(或正在创建的项目)吗?

任何关于在 Chocolat 或 Sublime Text 2 中使用 Objective-C 的一般性评论也将受到欢迎。