This package provides additional tempo configurations and templates for various modes.
(with-eval-after-load 'tempo
(define-key goto-map "\M-e" 'tempo-forward-mark)
(define-key goto-map "\M-a" 'tempo-backward-mark))
(with-eval-after-load 'abbrev-hook
(define-key global-map "\C-z" 'abbrev-hook-call))
(with-eval-after-load 'csharp-mode (require 'tempo-extra-csharp))
(with-eval-after-load 'elisp-mode (require 'tempo-extra-elisp))
(with-eval-after-load 'js (require 'tempo-extra-js))
(with-eval-after-load 'lisp-mode (require 'tempo-extra-lisp))
(with-eval-after-load 'nix-mode (require 'tempo-extra-nix))
(with-eval-after-load 'org (require 'tempo-extra-org))
tempo-template-csharp-PropertyChangedProperty
currently does not have an abbrev.
defvar
defun
defgroup
defcustom
defface
ert-deftest
switch
function
if
for
try
clog
ctime
lambda
let
defvar
defun
defpackage
defsystem
fetchurl
fetchzip
fetchgit
fetchFromGitHub
changelog
prepares a new changelog entry with Unreleased dateUnreleased
used to release a changelog entry with Unreleased date
This is a definition function for tempo templates that uses abbrev-hook internally. For example usage, see files.
This package provides tempo-extra-user-elements
function which adds some new
elements to tempo languag.
Conditional and looping constructs similar to skeleton ones, making skeleton pretty much obsolete. For example, the following snippets are almost equivalent:
(define-skeleton someskel "Docs."
nil
"(:option"
("Insert symbol: " " #:" str)
")")
(tempo-define-template
"sometemp"
'("(:option"
(:while ("Insert symbol: " sym)
" #:" (s sym))
")"))
Some more complicated behavior:
(define-skeleton someskel "Docs."
nil
"(:option"
;; insert until empty string is given
("Insert symbol: " " #:" str)
& ")"
;; or don't insert at all. It is a hack that physically removes "(:option"
;; string by deleting 8 characters if previous statements didn't move the
;; point
| -8)
(tempo-define-template "sometemp"
;; If input was not empty, start inserting
'((:when ("Insert symbol: " sym)
"(:option #:" (s sym)
;; Continue inserting until empty string is given
(:while ("Insert symbol: " sym)
" #:" (s sym))
")")))
There is also an :if
element, that can execute else branch if input was
empty.
(tempo-define-template "sometemp"
'((:if ("Insert symbol: " sym)
;; Use l element to group elements together
(l "insert " (s sym))
"something else")))
:with-parens
which places parens around body if there were none. This is used to have identical abbrev expansion forif
and(if)
.:elisp-namespace
returns the current elisp namespace (for package).:elisp-prefix
returns the current elisp prefix. It is usually an:elisp-namespace
plus a dash, but it respectsread-symbol-shorthands
.:elisp-group
is:elisp-namespace
without-mode
.
:nix-hash
returns a fake nix sha256 hash.:changelog-last-version
returns last version in changelog in org format.:date
returns current date inyyyy-MM-dd
format.
This repo is a nix flake. You can just add overlays.default
output to your
nixpkgs overlays.
{
inputs.tempo-extra.url = "github:xFA25E/tempo-extra";
outputs = { self, tempo-extra, nixpkgs }: let
pkgs = import nixpkgs {
system = "your-system";
overlays = [ tempo-extra.overlays.default ];
};
in {
# YOUR OUTPUTS
};
}
If you’ve installed it with your package manager, you’re done.
Install these required packages:
Then put .el files in your load-path
Bug reports, feature requests and suggestions are, of course, welcome!
GPLv3