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

Add various snippets for org-mode #260

Merged
merged 3 commits into from
Apr 7, 2018

Conversation

neymarsabin
Copy link
Contributor

This will add various snippets for org-mode like title, date, reveal and more.

cd orgTemplates
rsync -av --exclude=".*" . ~/.emacs.d/snippets/org-mode/
#+END_SRC
Then,tell emacs to reload all the snippets.For that do *M-x yas-reload-all*
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file should be removed or updated at least?

# name: reveal_all
# key: <rvl
# --
#+OPTIONS: reveal_center:t reveal_control:t reveal_height:-1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't think we need to have all these options..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of these options are removed. And these options are available from org-mode export too. I kept them here just in case.

# key: <rsb
# --

:PROPERTIES:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation seems wrong here

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: sourcecode
# key: <s
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one already exists and it's from org-mode, so I think it's not needed

@AndreaCrotti
Copy link
Owner

Some very nice snippets but maybe a bit too much, and the thing is that by default TAB is bound to org-cycle so I normally haven't really used yasnippet at all in org-mode files.
How do you have it set up @neymarsabin ?

@neymarsabin
Copy link
Contributor Author

Thanks for the comments @AndreaCrotti, Surely TAB is bound to org-cycle. But most of the snippets start with < which won't be a problem while using with TAB. I use most of them every time I use org-mode and these can be handy most of the time. 👍

@AndreaCrotti AndreaCrotti added the seen PR was seen and initial feedback was given label Apr 7, 2018
# key: <ta
# --
#+CAPTION: ${1: caption of the table}
#+ATTR_HTML: :width 100%
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attr html is not really always needed imho, I never used it at least, and caption could also be optional

@AndreaCrotti
Copy link
Owner

Looks good, the only snippet I would not merge is the reveal_all one possibly, and I left another comment as well.
If you fix these two little things I'm happy to merge it, thanks for your contribution!

@AndreaCrotti
Copy link
Owner

Thanks!

@AndreaCrotti AndreaCrotti merged commit 66031e5 into AndreaCrotti:master Apr 7, 2018
@neymarsabin
Copy link
Contributor Author

Thanks @AndreaCrotti and happy to contribute more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
seen PR was seen and initial feedback was given
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants