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

Function to load snippets without confirmation #1202

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lanceberge
Copy link

@lanceberge lanceberge commented Aug 25, 2024

Yasnippet by default prompts the user to enter a table, file path to save the snippet, and if they want to save the buffer.
I found myself almost always applying the defaults, so I wrote a function that saves the snippet, loads it, and quits without any confirmation.

Testing

M-x yas-new-snippet
Fill in a snippet
M-x yas-load-snippet-buffer-and-close-noconfirm
write out the key for the snippet you created and press <tab>

@Mango0x45
Copy link

Instead of (car (cdr (car ...))) you can just do (cadar ...)

@lanceberge
Copy link
Author

lanceberge commented Oct 20, 2024

Cool, updated

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

Successfully merging this pull request may close these issues.

2 participants