Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overiding/replacing individual snippets? #1396

Open
pazz opened this issue Jan 21, 2022 · 2 comments
Open

overiding/replacing individual snippets? #1396

pazz opened this issue Jan 21, 2022 · 2 comments

Comments

@pazz
Copy link

pazz commented Jan 21, 2022

Apologies for my ignorance but how would I go about locally changing individual snippets?

Particularly, I'd like to permanently, but locally revert 2502f24
because I much prefer the single $s for inline math mode in tex (yes I know cue in religious arguments now).
I know that I can just remove that snippet from the repo but I'd also like to occasionally update my snippets from this repo without having to edit it again each time.

I have tried copying the respective file to ~/.vim/UltiSnips/tex.snippets and changing that snippet back, but the one from the repo takes preference.

Any help would be much appreciated!

@lpil
Copy link
Collaborator

lpil commented Jan 21, 2022

I'm unsure. Best ask in the snippet plugin issue tracker for questions of plugin behaviour.

If it helps we could convert snippet to the snipmate format, I think that one is overridden by ultisnips format, which you could have in your personal snippets.

Would a second snippet with the desired format help?

@idbrii
Copy link
Contributor

idbrii commented Oct 21, 2022

:help UltiSnips-clearing-snippets

To clear one or more specific snippet, provide the triggers of the snippets as
arguments to the 'clearsnippets' command. The following example will clear the
snippets 'trigger1' and 'trigger2'.

In your own ~/.vim/UltiSnips/tex.snippets file (no need to copy the full vim-snippets one):

clearsnippets $$
snippet im "Inline Math" w
$${1}$
endsnippet

I know about this feature, but always have trouble remembering what it's called! (I expect delsnippet). Maybe we should get "delete" somewhere in that documentation...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants