Commit Graph

38 Commits

Author SHA1 Message Date
9ffb740b0f Add SPC / D and SPC / P keybinds #1531
For searching from another directory/project (prompted)
2019-07-02 14:13:30 +02:00
65efbc4204 Fix prompts for search-{cwd,project} commands 2019-07-02 14:06:31 +02:00
57bd7a385e Fix typo in +default/org-notes-headlines 2019-05-20 21:09:10 -04:00
2e6d8be6fc Rethink SPC n keybinds and add new ones
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
2019-05-17 23:57:24 -04:00
b821bfca1f Fix newline-and-indent advice forgetting indentation
e.g. in python-mode docstrings. The point-in-string case is no longer
handled, because indent-according-to-mode handles it properly already.
2019-05-15 15:22:08 -04:00
3c01de8876 Fix #1320: generalize SPC *
Was formerly using ripgrep, and only ripgrep.
2019-04-10 20:14:50 -04:00
3f751c1179 Correctly regexp-quote symbol on SPC * 2019-04-10 20:11:41 -04:00
5e8687cd45 Add SPC * for project-searching symbol at point 2019-04-10 18:57:57 -04:00
f2b8280b2a Add +default/search-from-cwd & +default/search-project 2019-03-08 04:25:45 -05:00
d46bb287ae General refactor of Doom core
- 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!
2019-03-02 01:34:19 -05:00
ad837e6d13 Move evil ex commands to feature/evil
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).
2019-02-28 14:31:16 -05:00
aa9c4f63ed Fix :cd #1208 2019-02-27 14:43:24 -05:00
acddf6a047 Move delete-backward-char & newline-and-indent advice
To config/default; the only place it is used.
2019-02-22 00:25:30 -05:00
d46c2582d0 Fix 'not an evil-paste' error on SPC i y #1095
yank-pop and evil-paste-pop are picky little buggers, we need our own
delegate.
2019-02-12 00:51:07 -05:00
d79817edeb Fix unbalanced parens in +default/project-tasks 2019-02-12 00:47:15 -05:00
3694b0d411 Standardize M-RET/M-S-RET as an "add new item" key 2019-01-21 22:07:31 -05:00
9f455edcdf Add interactive form to +default/project-tasks
It is required for key-bound commands. Also added a docstring.
2018-12-31 15:28:35 -05:00
9a0da588d9 Add helm to project tasks 2018-12-28 03:31:03 +02:00
4daa9271a0 Introduce general.el & rewrite map!
+ 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
2018-12-22 04:14:43 -05:00
91b76d8437 Move default snippets library to feature/snippets
Removes the +snippets flag from config/default. The default snippets can
be disabled by disabling the emacs-snippets package.
2018-11-02 18:43:44 -04:00
dc8c01f17f Add +default/newline alias
Forgot to add it in 08beff91
2018-06-28 14:46:33 +02:00
4ad9e18135 +default/easymotion => +evil/easymotion 2018-06-22 12:02:31 +02:00
ab01e0167d Fix evil-easymotion lazyloading middleman
It would fire off the wrong prefix when no operator was active (thus
passing nil to where-is-internal).

Reported by @ar1a
2018-06-22 10:24:48 +02:00
3e802c1b15 Fix +default/easymotion aborting evil operator
Now evil operators will work with +default/easymotion when you first
startup Emacs.

Reported by @ar1a
2018-06-20 18:39:44 +02:00
6693db48af Mark +org-dir obsolete (use org-directory instead)
I prefer not to invent new variables when they aren't strictly
necessary. org-directory is one such variable (although the other path
variables are still necessary).
2018-06-15 01:05:22 +02:00
1e81a35461 Minimize dependence on map!
This is in preparation for general.el integration coming in 2.1.1. It is
very likely that map! will change (and even more, be split into several
macros). Not much, but change none-the-less. Specifically, the state
keywords (e.g. :nvi, :n, :i) will be removed in favor of a :state
property that takes a list, e.g. (normal visual insert).

In any case, both map! and general are also relatively expensive
compared to define-key and evil-define-key* (and the new define-key!
macro), so use that when we can.

This also means changes to either API won't affect Doom's modules in the
long term.
2018-06-03 15:46:00 +02:00
e4c56d0f15 Fix +default:multi-*-line motions in magit buffers 2018-06-02 18:20:09 +02:00
82f240ffc9 Bind SPC h w to +default/man-or-woman #639
Woman is essentially elisp-only Man; useful for systems without
man (Windows, particularly).
2018-06-01 12:13:56 +02:00
1b8dce260b config/default: restore find-in-snippets command #597
And conditionally bind snippets keybinds
2018-05-21 18:34:33 +02:00
34b6d4d0cf config/default: move evil-easymotion keybinds into +bindings.el
It's easier to see and discover this way.
2018-05-16 23:50:50 +02:00
355b4b1364 💥 Replace config/private w/ first-class support
The config/private module has been removed. ~/.doom.d (or
~/.config/doom; whichever is detected first) is now a first class
citizen of Doom and should just work(tm).

Your init.el only needs to contain:

  (require 'core (concat user-emacs-directory "core/core"))

And you may place your doom! block in ~/.doom.d/init.el (or
~/.config/doom/init.el).
2018-04-03 03:07:30 -04:00
28303e24a2 config/default: fix easymotion keybind
This fixes a regression caused by the recent precedence update
(abe42fcb) for `map!`, which broke `+default/easymotion`.
2018-03-22 19:53:31 -04:00
0156c67ad0 config/default: autoload +default/easymotion 2018-03-20 15:57:21 -04:00
aeb030e391 config/default: new +default/compile command (bound to M-b) 2018-03-14 19:45:52 -04:00
9d55d1e1ba config/default: remove private macros (unnecessary complexity) 2018-03-01 04:15:09 -05:00
873ad22894 config/default: make private macros private again! 2018-03-01 04:09:39 -05:00
22e9452104 config/default: +default/find-in-snippets => +default/browse-snippets 2018-02-18 03:12:38 -05:00
6d7db48dc1 💥 Move :private modules to :config 2018-02-14 23:36:27 -05:00