- Moved doom/sudo-find-file from 'SPC f S' to 'SPC f u'
- Moved doom/delete-this-file from 'SPC f X' to 'SPC f D'
- Replaced save-buffer on 'SPC f s' with write-file ('SPC b s' is still
bound to save-buffer)
- Moved magit-file-delete from 'SPC g x' to 'SPC g D' (for consistency
with the above, and to reduce accidental key presses)
This isn't vital enough a package to be included in core. Emacs already
provides view-lossage, and there are other, better packages for
displaying your keybinds as you type.
Even one that I've been working on (with special evil support):
https://github.com/hlissner/doom-emacs-private/blob/master/lisp/keycast.el
Defines a new minor-mode `+word-wrap-mode` which configures
adaptive-wrap-prefix-mode and visual-line-mode for smart soft-wrapping
of code.
Evil users can toggle it with `SPC t w`.
Enable globally with `+global-word-wrap-mode`.
See the README for more details!
Instead of relying on the optional ":ui workspaces" feature, the
built-in evil-window-delete is used. ":ui workspaces" remaps the
evil-window-delete already, so no functionality is lost for users of
that feature.
Fixes https://github.com/hlissner/doom-emacs/issues/1640.
This commit does two things:
- Renames def-advice! to defadvice!, in the spirit of naming convenience
macros after the function/macro they enhance or replace.
- Correct the names of advice functions to indicate visibility and
intent. A public advice function like doom-set-jump-a is meant to be
used elsewhere. A private one like +dired--cleanup-header-line-a
shouldn't -- it likely won't work anywhere but the function(s) it was
made to advise.
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.
Also changes def-package-hook! -> use-package-hook!
The old macros are now marked obsolete and will be removed when straight
integration is merged.
This is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:
1. Replace the bar | to indicate a hook function with a -h suffix, e.g.
doom|init-ui -> doom-init-ui-h
doom|run-local-var-hooks -> doom-run-local-var-hooks-h
2. And add a -fn suffix for functions meant to be set on variables,
e.g.
(setq magit-display-buffer-function #'+magit-display-buffer-fn)
See ccf327f8 for the reasoning behind these changes.
This is first of three big naming convention updates that have been a
long time coming. With 2.1 on the horizon, all the breaking updates will
batched together in preparation for the long haul.
In this commit, we do away with the asterix to communicate that a
function is an advice function, and we replace it with the '-a' suffix.
e.g.
doom*shut-up -> doom-shut-up-a
doom*recenter -> doom-recenter-a
+evil*static-reindent -> +evil--static-reindent-a
The rationale behind this change is:
1. Elisp's own formatting/indenting tools would occasionally struggle
with | and * (particularly pp and cl-prettyprint). They have no
problem with / and :, fortunately.
2. External syntax highlighters (like pygmentize, discord markdown or
github markdown) struggle with it, sometimes refusing to highlight
code beyond these symbols.
3. * and | are less expressive than - and -- in communicating the
intended visibility, versatility and stability of a function.
4. It complicated the regexps we must use to search for them.
5. They were arbitrary and over-complicated to begin with, decided
on haphazardly way back when Doom was simply "my private config".
Anyhow, like how predicate functions have the -p suffix, we'll adopt the
-a suffix for advice functions, -h for hook functions and -fn for
variable functions.
Other noteable changes:
- Replaces advice-{add,remove}! macro with new def-advice!
macro. The old pair weren't as useful. The new def-advice! saves on a
lot of space.
- Removed "stage" assertions to make sure you were using the right
macros in the right place. Turned out to not be necessary, we'll
employ better checks later.
- 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.
The former searches the current window/buffer, the latter searches all
windows in the frame.
Removes g s ? (deemed not as useful as avy-goto-char-timer)
They are:
]m, [m
Jump to next/previous beginning of method/function.
]M, [M
Jump to next/previous end of method/function
]#, [#
Jump to next/previous preprocessor directive (only supports C-style
directives for now)
]*, [* (or ]\, [\)
Jump to next/previous comment
Adds these keys, inspired by tpope/vim-unimpaired:
[ SPC, ] SPC (or [o, ]o)
Add COUNT blank lines above/below the cursor
[f, ]f
Visit previous/next file in current folder, alphabetically
[u, ]u
Url encode/decode operators
[y, ]y
C-string-style escaping/unescaping operators (escapes quotes,
backslashes and control characters)
[x, ]x
XML entity encoding/decoding operators (only if :lang web is enabled)
[F, ]F
Focus previous/next frame (decided this is better than ]t/[t which is
being used by hl-todo-{next,previous})
We already had gp and ]b/[b (buffers).
We're not going to port ]e/[e because it is redundant with ddp/ddP or gx
(evil-exchange). I also think these keybinds are better suited to
{next,previous}-error.
The semantics of SPC o t and SPC o T (or SPC o e and SPC o E in eshell's
case) have been reversed.
The lowercase keybind toggles the popup (and the prefix arg forciby
recreates the popup), and the uppercase keybind switches to that
terminal in the current buffer (whose prefix arg will open the terminal
in default-directory, rather than the project root).
- +{term,vterm,eshell}/open have been replaced with +X/here commands and
are bound to SPC o T (and SPC o E in eshell's case).
- +{term,vterm,eshell}/popup* have been replaced with +x/toggle commands
and are bound to SPC o t (and SPC o e in eshell's case).
The "toggle" behavior will do as the name implies, except will select
the popup if it is visible but unfocused.
Setting the flag `+manual` of the `objed` module makes the user
responsible for calling `objed-activate` when needed. The binding
`M-SPC` is set in the default Emacs bindings.
And rebind its keys from C-a/C-S-a to g= and g-. This is because the old
narrow/widen commands aren't nearly as useful (and have a number of
alternative keybinds).
As much as I'd like to us C-a/C-x (as it is in Vim), C-x is an essential
keybind for Emacs.
Also, in visual mode, each number will be affected incrementally (ala g
C-a and g C-x in vim).
Moved scratch buffer to C-c p x and X. This overrides projectile's term
commands, but users should be using the term, vterm and eshell modules'
commands instead.
For non-evil users:
<leader> x doom/open-scratch-buffer
<leader> X doom/switch-to-scratch-buffer
<leader> p s doom/open-project-scratch-buffer
<leader> p S doom/switch-to-project-scratch-buffer
For evil users:
<leader> x doom/open-scratch-buffer
<leader> b s doom/open-scratch-buffer
<leader> b S doom/switch-to-scratch-buffer
<leader> p s doom/open-project-scratch-buffer
<leader> p S doom/switch-to-project-scratch-buffer
Adds the following keybinds:
SPC n . Browses org-directory
SPC n / Text search in org-directory
SPC n * Text search in org-directory with symbol at point
SPC n h Jump to org headline in org-agenda-files
They were throwing 'cannot find docset' errors.
- Adds new +lookup/in-all-docsets command.
- If a prefix arg is passed to +lookup/in-docsets, it will search all
docsets in dash-docs-common-docsets.
Each prefix now defines a doom-leader-DESC-map keymap, where DESC is the
which-key description for that prefix key. This should make it easier
for users to move leader prefixes. e.g.
To move SPC TAB (workspaces) to SPC l:
(map! :leader
"TAB" nil
"l" doom-leader-workspaces-map)
- Renamed doom/open-vanilla-sandbox to doom/sandbox (because it's not
just for vanilla testing anymore)
- Renamed doom/open-bug-report to doom/report-bug (for consistency with
`report-emacs-bug`; makes it easier to discover)
- Add SPC h d b for doom/report-bug
- Add SPC h d s for doom/sandbox
Adds the following commands:
- doom/help (opens the Doom manual)
- doom/help-search (for searching through org headlines in Doom's
documentation)
- doom/help-faq (for searching the FAQ)
- doom/help-news (for browsing the Doom newsletters)
- doom/help-autodefs (renamed from doom/describe-autodef -- for looking
up documentation on autodef function/macros, like
`set-lookup-handler!`)
- doom/help-modules (renamed from doom/describe-module, for jumping to a
Doom module's documentation)
- doom/help-packages (renamed from doom/describe-package and recently
fixed -- looks up information about installed packages, including what
Doom module(s) install it and where it is configured)
- doom/help-package-config (for searching and jumping to any block where
a package is configured in Doom Emacs)
Also adds the SPC h d (or C-h d) prefix for Doom-specific help commands.
SPC h D will invoke doom/help.
However, the documentation itself hasn't been committed yet, so some of
these commands may be useless atm. Sorry!
Macro was renamed to be consistent with other autodefs
- Make these repeaters buffer-local
- Don't bind repeater if motion failed
- Defer evil-snipe repeaters until evil-snipe is loaded