sublimetext-snippet

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

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 2 snippet all-caps when typing in fields

北城余情 提交于 2019-12-12 03:16:01
问题 I want to simplify the typing of this: export const RECEIVE_POSTS = 'RECEIVE_POSTS' I then came up with this snippet: <snippet> <content><![CDATA[ export const ${1/(.+)/\U$1/g} = '${1/(.+)/\U$1/g}' ${1} ]]></content> <tabTrigger>con</tabTrigger> <scope>source.js</scope> <description>ES6 Module Export Variable</description> </snippet> However, the downside is that I need to delete the originally typed input. Is is possible that the letters be automatically transformed into all-caps when first

How to create a snippet for html in Sublime Text?

隐身守侯 提交于 2019-12-12 01:46:01
问题 I made a snippet which works on other scopes, but won't with html. When i'm typing "test" just nothing happens. Why? <snippet> <content><![CDATA[test]]></content> <tabTrigger>test</tabTrigger> <scope>text.html</scope> </snippet> 回答1: Try to type "<test" instead of "test". 来源: https://stackoverflow.com/questions/36129043/how-to-create-a-snippet-for-html-in-sublime-text