Identify Sublime Text 3 snippet source

只愿长相守 提交于 2020-01-11 07:27:06

问题


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


回答1:


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.




来源:https://stackoverflow.com/questions/37033039/identify-sublime-text-3-snippet-source

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!