识别 Sublime Text 3 片段源 [英] Identify Sublime Text 3 snippet source

查看:29
本文介绍了识别 Sublime Text 3 片段源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道我如何识别 Sublime Text 3 代码片段的来源?我认为 Rails 有一个来自某个包.我已经卸载了上述软件包,但该代码段仍然可以使用.快把我逼疯了

解决方案

Ctrl + Backtick打开控制台,粘贴以下代码,按回车.

sublime.active_window().new_file().run_command( "append", { "characters": "\n".join( sorted( sublime.find_resources( "*.sublime-snippet" ) ) )})

<小时>

所有已安装代码段的列表将在新选项卡中打开.然后,您可以搜索要删除的代码段.

片段会显示其完整路径,因此您将知道它们位于哪个插件目录中.

<小时>

我建议使用

Does anyone know how I can identify where a Sublime Text 3 code snippet is coming from? There's one for Rails that I thought was coming from a certain package. I've uninstalled said package but the snippet is still available for use. It's driving me nuts

解决方案

Press Ctrl + Backtick to open the console, paste the following code, and press Enter.

sublime.active_window().new_file().run_command( "append", { "characters": "\n".join( sorted( sublime.find_resources( "*.sublime-snippet" ) ) ) } )


A list of all installed snippets will open in a new tab. You can then search for the snippet you want to remove.

Snippets are shown with their full paths, so you will know which plugin directories they are located in.


I recommend using PackageResourceViewer to open the snippet and comment out the contents, rather than deleting the snippet file.

This will effectively remove the snippet from the auto-complete list, maintain the original copy of the snippet within the package, and prevent a plugin update from replacing the deleted snippet file.


这篇关于识别 Sublime Text 3 片段源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆