- Introduces the +snippets/new (SPC s n) command for creating a new private snippet - Introduces the +snippets/new-lias (SPC s N) command for creating a new private snippet alias, which will invoke another snippet (you will be prompted to select one). This will only work with the emacs-snippets library bundled with Doom Emacs, however, as it depends on its API. - Introduces +snippets/edit (SPC s c) for modifying existing snippets. How this differs from yas-visit-snippet-file is it will copy the contents of built-in snippets into a buffer primed for your private snippets (in DOOMDIR/snippets), while yas-visit-snippet-file will simply open the originating snippet. - Introduces the +snippets/find (SPC s ?), +snippets/find-for-current-mode (SPC s /) and +snippets/find-private (SPC s f) commands for, respectively, finding a snippet file among *all* directories in yas-snippet-dirs, finding a snippet for the current major mode (plus parents), and finding a snippet from among your private library. This opens built-in snippets in read-only mode, but you can press C-c C-e to open it in +snippets/edit. |
||
---|---|---|
.. | ||
autoload | ||
+emacs-bindings.el | ||
+emacs.el | ||
+evil-bindings.el | ||
+evil.el | ||
config.el | ||
packages.el | ||
README.org |
:config default
This module provides a set of reasonable defaults, including:
- A Spacemacs-esque keybinding scheme
- Extra Ex commands for evil-mode users
- A yasnippet snippets library tailored to Doom emacs
- A configuration for (almost) universally repeating searches with
;
and,
The defaults module is intended as a "reasonable-defaults" module, but also as a reference for your own private modules. You'll find my private module in a separate repo.
Refer to the Customization page on the wiki for details on starting your own private module.
Table of Contents TOC
Install
This module has no external dependencies.
Configuration
Using another snippets library
Don't want to use provided one? Then add this to your private module,
;; in config/$USER/packages.el
(package! emacs-snippets :ignore t)
;; in config/$USER/config.el
(def-package-hook! emacs-snippets :disabled t)
(after! yasnippet
(push "~/path/to/my/private/snippets" yas-snippet-dirs))
I'm not an evil user…
That's fine. All evil configuration is ignored if :editor evil
is disabled.
Appendix
Commands
+default/browse-project
+default/browse-templates
+default/find-in-templates
+default/browse-emacsd
+default/find-in-emacsd
+default/browse-notes
+default/find-in-notes
+default/find-in-snippets
Hacks
epa-pinentry-mode
is set to'loopback
, forcing gpg-agent to use the Emacs minibuffer when prompting for your passphrase. Only works with GPG 2.1+!