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
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:
- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces
More potential changes in the future:
- A new :term category for terminal emulation modules (eshell, term and
vterm).
- A new :os category for modules dedicated to os-specific functionality.
The :tools macos module would fit here, but so would modules for nixos
and arch.
- A new :services category for web-service integration, like wakatime,
twitter, elfeed, gist and pastebin services.
Changes
- SPC f . -> Browse files from here
- SPC f / -> Find file from here (recursive)
Moves
- SPC f > -> SPC p > (Find file in another project)
- SPC f ? -> SPC p ? (Browse files in another project w/ find-file)
- Adds doom/open-project-scratch-buffer (persistent project scratch
buffers)
- Prefix arg = open scratch buffer in current window, for both
doom/open-scratch-buffer and doom/open-project-scratch-buffer.
- Rename doom/delete-scratch-files ->
doom/delete-persistent-scratch-file
- Remove doom-scratch-buffer-display-fn
- Rename doom-scratch-files-dir -> doom-scratch-dir
- Add SPC p s keybind to open project scratch buffer
- Moved SPC p x to SPC p i (invalidate cache)
- Add SPC x prefix for opening terminals/ielm at project root
- Add SPC a and SPC d for adding/removing known projects
- Add SPC f for finding a file in other projects
- Add SPC b for switching project buffer (TODO improve ivy/helm support)
- Add SPC k for killing project buffers
- Remove ]s/[s keybinds in org-mode (rebound to ]c/[c); they overwrote
next/prev flyspell error commands (which are vim defaults)
- Remove ]S/[S because z= already exists
- Remove redundant ]s/[s global keybinds (already bound by evil)
- Mention missing and evil's flyspell keybinds in a comment
- Removes +gist/kill-cache (gist-list and gist-list-user with a
universal argument already does this).
- Removes +gist/open-current. No longer necessary when gists aren't
opened in popups.
- Makes keybinds more consistent with other "porcelains", like elfeed's
or magit.
+ Fixes config.org buffer being killed when tangled
+ Tangle files in same session if ob-tangle is loaded (and in
noninteractive sessions). i.e. only tangle quietly when starting up
interactive Emacs.
org-babel-tangle-file has reportedly killed config.org buffers, despite
them being visited. Since we're not doing anything with the return
value, may as well keep it in a separate process.
+ Now recompiles literate config if you modify org files in DOOMDIR
+ Replaced +literate/compile with +literate/reload
+ Calls org-babel-tangle-file directly if org package is loaded
+ Change mtime check mechanism for literate tangling at startup
IMPORTANT: This is a breaking update for Mac users, as your shell
environment will no longer be inherited correctly (with the removal of
exec-path-from-shell). The quick fix is: 'bin/doom env refresh'. Also,
the set-env! autodef now does nothing (and is deprecated), be sure to
remove calls to it in your config.
Smaller changes:
+ This update also adds --no-* switches to doom quickstart
+ Includes general improvements to the documentation of several bin/doom
commands.
+ Moves doom/reload* commands to core/autoload/config.el
+ doom/reload-project has been removed (it didn't actually do anything)
The breaking change:
This update adds an "envvar file" to Doom Emacs. This file is generated
by `doom env refresh`, populated with variables scraped from your shell
environment (from both non-interactive and interactive sessions). This
file is then (inexpensively) loaded at startup, if it exists.
+ The file is manually generated with `doom env refresh`.
+ It can be regenerated automatically whenever `doom refresh` is run by
running `doom env enable` (`doom env clear` will reverse this and
delete the env file).
+ `doom quickstart` will ask if you want to auto-generate this envvar
file. You won't need it if you're confident Emacs will always be
started from the correct environment, however.
+ Your env file can be reloaded from a running Emacs session with `M-x
doom/reload-env`. Note: this won't work if the Emacs session you're
running it in doesn't have a correct SHELL set. i.e. don't use this to
create your first env file!
The idea isn't mine -- it's borrowed from Spacemacs -- and was
introduced to me in #1053 by @yurimx. I was impressed with it. Prior to
this, I was unhappy with exec-path-from-shell (no hate to the dev, I
understand its necessity), and 'doom patch-macos' wasn't ideal for mac
users (needed to be reapplied every time you update Emacs). What's more,
many users (even Linux users) had to install exec-path-from-shell
anyway.
This solution suffers from none of their shortcomings. More reliable
than patch-macos, more performant and complete than
exec-path-from-shell, and easily handled by bin/doom.
- Some buffer-local commands were removed from leader binds
- Some more commands were added to org's localleader
- Reformatted some leader keys so that lower/upper case keys are grouped
together, rather than apart.
- Add SPC-s-c and SPC-s-e for creating/using temporary snippets (with
auto-yasnippet).
- Move profiler from 't' to 'T' (as not to override
`help-with-tutorial', esp for non-evil users)
- Replace C-c (describe-copying) with describe-coding-system
- Bind doom/describe-symbol to 'h'
- Bind `describe-key-briefly' to 'C-k'
Patch the apropos button types so they call helpful instead of the
built-in describe functions. Also add some bindings to apropos-mode-map
so it behaves like other help modes.
Add `doom/describe-symbol` function, which shows documentation for
callable and variable symbols. If a symbol is both a variable and a
callable, it dispatches to apropos. This gives a better workflow than
`helpful-symbol`, which annoyingly prompts the user.
Remap `describe-symbol` to `doom/describe-symbol`, and update
`+emacs-lisp-lookup-documentation` to call it also.
Done to better facilitate a non-evil config.
- Adds winum (and enables support for it in doom-modeline)
- Adds expand-region (#1231)
- Uses default smartparens config for non-evil users (WIP)
The leader keys have been redesigned a) for consistency, b) to reduce
collisions with packages, and c) to improve command coverage. However,
much of it still comes from a vim user, so it needs more testing.
SPC h now maps to help-map to reduce redundancy. Some adjustments and
additions were made to this map so all users (evil and vanilla) can
benefit from Doom's extra help commands.
- Code reduction and refactor across the board (cull unneeded minor
advise, hooks and hacks or update them)
- Revise outdated comments and docstrings
- Reorganize core autoload libraries
- Remove large file check (Emacs already has a built-in one, which we
augment to be even more performant when it does kick in)
- helpful.el can now be disabled completely through package!
They've been removed from feature/workspaces and moved into
core/autoload/sessions, which falls back to desktop.el if persp-mode
isn't present. This also offers a substantial speed up to
restart+restoring and restoring sessions in general.
Also fixes#1210, where the newly spawned frame after doom/restart
wasn't focused.
Introduces the following commands:
- doom/restart
- doom/restart-and-restore
- doom/quickload-session
- doom/quicksave-session
- doom/load-session
- doom/save-session
- +workspace/restore-last-session (alias for doom/quickload-session)
And removes
- +workspace/load-session
- +workspace/save-session
- +workspace/load-last-session (renamed to +workspace/restore-last-session)
- +workspace/restart-emacs-then-restore (replaced by doom/restart-and-restore)
- :ss (ex command)
- :sl (ex command)
This makes text insertion behave more like traditional editors.
Delete-selection-mode allows selections to be replaced when yanking or
inserting. This enables it by default for non-evil users and in insert
mode for evil users. Also enables selecting text with shift.
These commands aren't used by config/default anyway, and
+default:multi-{next,previous}-line were moved to my private config.
Also fixes#1208 (:cd without args will now CD to $HOME).
- SPC f . -> counsel-file-jump or find-file
- SPC f > -> doom/browse-in-other-projects
- SPC f / -> projectile-find-file
- SPC f ? -> doom/find-file-in-other-project
- Moved doom/sudo-find-file to SPC f S
This change was made to accommodate the new
doom/browse-in-other-projects and doom/find-file-in-other-project
commands, which make it easy to jump to files in other known projects.
- SPC o r now prompts for a REPL to open when none was found for the
current buffer.
- REPL handlers must now follow the naming convention "*/open*-repl".
e.g. +python/open-ipython-repl, +emacs-lisp/open-repl, etc.
- +eval/open-repl has been split in two:
- +eval/open-repl-other-window
- +eval/open-repl-same-window
Should also fix void-function/void-variable errors caused by evil-magit
depending on the newer version of magit (#1174).
Also introduces a redesign of the SPC g prefix.
On MacOS, command used to be 'meta, which Emacs (and many packages) use
for many keybinds. I don't want to pollute the command key, so it is now
meta (as is the Emacs default).
The MacOS keybind fixes have been moved back to super.
Some major modes rely on external parsers for correct indentation, like
js2-mode or enh-ruby-mode. They don't properly indent the closing
comment pair (*/), so we do it manually.
+ C-b/C-f/C-w/C-u are from vim, and so will only be set for evil users.
+ C-a/C-e exists in both vim and Emacs, so we make them smarter for both
users.
Using meta is a little more flexible. Since there is no dedicated meta
key on our keyboards (anymore), it can be remapped to another modifier
by changing mac-command-modifier, x-meta-keysym, etc. without
sacrificing super or alt keybinds.
+ Added +smartparens flag to config/default for default smartparens
config.
+ Fixed +tng support for completion/company.
+ Removed super keybinds (for all but MacOS)
+ Moved "keybind fixes" to config/default/config.el (these should be
universally available).
+ Replaced both +default-repeat-forward-key and +default-repeat-backward-key
with +default-repeat-keys. If this variable is nil, the universal
repeat motions won't be bound.
+ :map arguments shouldn't be quoted
+ :localleader keys default to all states in the absence of state
modifiers. This is preferred, rather than restricting their use to
normal state.
+ :map* is deprecated (there is no difference between it and :map)
kbd is necessary for global-set-key, otherwise it reads M-` as three
keys M, - and `, and M is already bound to self-insert-command, so it
cannot be used as a prefix.
+ Now uses an overriding keymap for leader keys, so that it is always
available, even outside of normal/visual states. In insert/emacs
states, or in sessions where evil is absent, an alternative prefix is
used for leader/localleader keys. See these variables:
+ doom-leader-prefix
+ doom-leader-alt-prefix
+ doom-localleader-prefix
+ doom-localleader-alt-prefix
+ Keybinds now support alternative prefixes through the new :alt-prefix
property. This is useful for non-evil users and non-normal evil
states. By default, this is M-SPC (leader) and M-SPC m (localleader).
+ Removed +evil-commands flag from config/default (moved to
feature/evil/+commands.el).
+ config/default/+bindings.el has been split into
config/default/+{evil,emacs}-bindings.el, which one is loaded depends
on whether evil is present or not. The latter is blank, but will soon
be populated with a keybinding scheme for non-evil users (perhaps
inspired by #641).
+ The define-key! macro has been replaced; it is now an alias for
general-def.
+ Added unmap! as an alias for general-unbind.
+ The following modifier key conventions are now enforced for
consistency, across all OSes:
alt/option = meta
windows/command = super
It used to be
alt/option = alt
windows/command = meta
Many of the default keybinds have been updated to reflect this switch,
but it is likely to affect personal meta/super keybinds!
The map! macro has also been rewritten to use general-define-key. Here
is what has been changed:
+ map! no longer works with characters, e.g. (map! ?x #'do-something) is
no longer supported. Keys must be kbd-able strings like "C-c x" or
vectors like [?C-c ?x].
+ The :map and :map* properties are now the same thing. If specified
keymaps aren't defined when binding keys, it is automatically
deferred.
+ The way you bind local keybinds has changed:
;; Don't do this
(map! :l "a" #'func-a
:l "b" #'func-b)
;; Do this
(map! :map 'local "a" #'func-a
"b" #'func-b)
+ map! now supports the following new blocks:
+ (:if COND THEN-FORM ELSE-FORM...)
+ (:alt-prefix PREFIX KEYS...) -- this prefix will be used for
non-normal evil states. Equivalent to :non-normal-prefix in general.
+ The way you declare a which-key label for a prefix key has changed:
;; before
(map! :desc "label" :prefix "a" ...)
;; now
(map! :prefix ("a" . "label") ...)
+ It used to be that map! supported binding a key to a key sequence,
like so:
(map! "a" [?x]) ; pressing a is like pressing x
This functionality was removed *temporarily* while I figure out the
implementation.
Addresses: #448, #814, #860
Mentioned in: #940
epa-file-encrypt-to is now set to the ids of all keys that match
user-full-name, if it is set. This should fix issues with multiple keys
with the same email addresses.
+ C-w o enlargens the current window
+ C-w O deletes all other windows
Both keys undo the change on second use (unless you have changed the
frame too much since).
These keybinds (particularly C-h) are a tad too imposing to be defaults.
Without C-h, the help commands in certain special modes (like magit or
org-agenda) become inaccessible.