Commit Graph

226 Commits

Author SHA1 Message Date
9113eab65a No-op set-repeater! later if +evil-repeat-keys is nil 2019-11-05 14:55:53 -05:00
8b5714bdfa editor/evil: bind zn in visual mode too 2019-11-04 12:49:48 -05:00
baac5dfee1 editor/evil: conform functions to naming conventions 2019-11-02 01:40:45 -04:00
4e7cdae570 Merge pull request #1993 from johsi-k/evil-module-typos
editor/evil: correct typos in readme
2019-11-01 13:10:21 -04:00
86bc214eb2 correct typos in evil readme 2019-11-01 14:02:07 +08:00
1c4a170614 Reformat vim-unimpaired-esque keybinds 2019-10-30 22:26:12 -04:00
5f6d9eadb3 Bind '{[,]} c' to jump between comments
I know {[,]} * and {[,]} \\ are the unimpaired keys for this, but
putting it on 'c' makes much more sense and is easier to hit.
2019-10-30 22:23:28 -04:00
1d09e4655a Fix split-window & update docstring 2019-10-29 18:27:19 -04:00
496a4b1b5f editor/evil: alphabetize text object keybinds 2019-10-29 18:20:35 -04:00
43030c789e editor/evil: revert focus-on-split behavior (and refactor advice)
Focus-on-split is being disabled to achieve vim parity. The advice is
still necessary to ensure splitting updates the window buffer list, so
operations like winner-undo undoes correctly.
2019-10-29 01:09:14 -04:00
6982281404 Fix mouse-1 on buttons initiating a selection 2019-10-28 23:23:13 -04:00
f18caa1518 evil-{,v}split-window-{below,right} = t
To match vim's behavior, when splitting windows. The
+evil-window-split-a and +evil-window-vsplit-a advice are still
necessary to preserve proper "window focus" order.
2019-10-28 23:23:13 -04:00
9e2b0c6332 editor/evil: fix autoload for +evil:whole-buffer-textobj 2019-10-28 23:23:13 -04:00
3c6f48f9ec Move evil & corrective keybinds to respective modules
Keybinds that correct behavior or provide or extend vim functionality
were moved to their respective modules, or to the :editor evil module.

Keybinds in the global space, that are particularly opinionated but
potentially harmful or imposing as a default, or likely for users to
change (like leader keys), are kept in config/default.
2019-10-26 23:44:28 -04:00
83387d89e9 editor/evil: move vim-unimpaired motions
To the unimpaired library
2019-10-26 00:37:51 -04:00
f2b77fe2c0 Add whole-buffer (g) and defun (f) text objects 2019-10-26 00:37:12 -04:00
65dcd901a0 Move common evil-collection-key-blacklist entries to editor/evil 2019-10-21 06:26:57 -04:00
fb692a843f README: general revision 2019-10-20 10:58:52 -04:00
90b59d00df editor/evil: update evil-collection-mode-list 2019-10-12 00:48:48 -04:00
b45cc335db lang/common-lisp: offload to evil-collection-sly 2019-10-12 00:48:48 -04:00
6ba7c97501 Remove the_platinum_searcher support
I'm reducing the scope of our project search so we can eventually focus
on ripgrep. By specializing I can extend Doom's features for project
searching.
2019-10-10 22:02:18 -04:00
7654764713 editor/evil: update docstring for +evil:align* commands 2019-10-10 21:38:08 -04:00
aac843511b Fix :h[elp] ex command
To now open documentation for ex commands, otherwise falling back to
apropos. If BANG, then searches Doom's (yet to be published) manual.
2019-10-10 21:31:13 -04:00
a3fa1e07b1 Refactor doom/kill-*-buffer commands 2019-10-10 16:11:42 -04:00
d87310bd55 Replace evil-commentary with evil-nerd-commenter
The latter provides a comment text object and better commenting support
across various languages.
2019-10-10 16:11:42 -04:00
07380af819 Add gy operator for yanking without indentation
Copies

   (a
    b
    c)

As

(a
 b
 c)
2019-10-10 16:11:41 -04:00
f93d3ca596 editor/evil: evil-escape-delay = 0.15 2019-09-20 23:55:25 -04:00
e10cd8cf2e Insult byte-compiler's mom
Yeah, that shut him up.
2019-09-20 23:10:53 -04:00
8a634bc04d Fix evil-collection-pdf not loading #1789
And prevents evil-collection-pdf from loading pdf-tools' eval-after-load
blocks twice.
2019-09-20 01:22:25 -04:00
fdeb1aa45d Prevent evil-collection from loading packages twice
Triggering eval-after-load blocks (and after!/use-package!) twice.
2019-09-15 16:18:31 -04:00
ab8b31e5bc Change behavior of BANG for +evil:narrow-buffer
BANG = use indirect buffers, otherwise, narrow/widen the current buffer.
2019-09-14 18:32:14 -04:00
20d15c685e Fix :narrow ex command 2019-09-14 01:56:38 -04:00
887bc05478 Ensure evil-escape loads later at startup
evil-normal-state-exit-hook is fired prematurely at startup, which makes
it a poor candidate for :after-call deferral.
2019-09-09 23:04:07 -04:00
059ede53b6 Update all unit tests
To meet changes introduced from the straight branch merge.
2019-09-03 00:59:46 -04:00
7138d47ef4 Disable evil-want-abbrev-expand-on-insert-exit
It may be a vim default, but why would anyone want this?
2019-08-19 12:48:36 -04:00
c8baa2b3f6 editor/evil: refactor ex commands; add evil-traces
This commit lazy loads Doom's custom ex commands. To add your own,
you'll need to wrap them in (after! evil-ex ...).
2019-08-15 14:58:41 -04:00
09d13fd60d Use add-hook! for inline hook defuns 2019-07-27 02:46:49 +02:00
ca295e4c79 Refactor evil-collection initialization
- Update comments
- Add code for easily refreshing evil-collection-mode-list
- Load evil-collection-term for multi-term
- Fix buffer-menu, image-mode, elisp and occur modules not loading
2019-07-26 03:12:07 +02:00
76cacb5bfe 💥 Rename def-package! -> use-package!
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.
2019-07-23 12:50:45 +02:00
d106272574 Fix ]f/[f (next/previous file) motions 2019-07-22 23:51:12 +02:00
88813ff196 Minor reformatting across the board
Gotta

Look

Nice
2019-07-22 22:34:08 +02:00
ffadd1307d Disable evil-collection-want-unimpaired-p
We have our own, better vim-unimpaired keybinds.
2019-07-22 13:31:56 +02:00
755835a207 Change ex command from :m[sg] to :messages
The former overwrote :m[ove].
2019-07-22 13:30:42 +02:00
060ede0e2e General, minor reformatting across the board
And an offering of blood to our great lord Byte Compiler-sama.
2019-07-22 02:37:45 +02:00
b90dede1ab 💥 Replace package.el/quelpa with straight #374
There are a few kinks to iron out, but for the most part it's done. Doom
Emacs, powered by straight. Goodbye gnutls and elpa/quelpa issues.

This update doesn't come with rollback or lockfile support yet, but I
will eventually include one with Doom, and packages will be (by default,
anyway) updated in sync with Doom.

Relevant threads: #1577 #1566 #1473
2019-07-22 02:30:40 +02:00
fdcb259bcd Major refactor of Doom core files
- Remove core-os and move many of its settings out to other core
  libraries, where they belong
- Significantly improve commenting & compartmentalization of many
  settings
- Correct some mis-named public hooks (that were named as if they were
  private)
- Move the vast majority of optimizations to "Optimizations" section in
  core.el
- Don't activate xclip-mode or osx-clipboard-mode if we're accessing
  Emacs through an SSH connection (does more bad than good there)
- Add fast-but-imprecise-scrolling = t
- Set bidi-display-reordering = 'left-to-right, at the recommendation of
  an Emacs dev. Apparently setting it to nil is undefined, as Emacs is
  designed to always assume it's set; setting it explicitly to
  left-to-right will still do what was originally intended by turning it
  off: to reduce line/text scans for bidirectional text, which gives us
  a moderate boost in general runtime snappiness
- Set inhibit-compacting-fon-caches = t on windows (where it struggles
  especially with icon fonts)
- Disables "literal" mode for very large files (because I will be
  backporting so-long.el from Emacs 27 in the next commit)
2019-07-22 02:30:38 +02:00
149b2617b0 💥 revise hook/var fns naming convention (2/2)
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.
2019-07-22 02:30:38 +02:00
51d3b1b424 💥 revise advice naming convention (1/2)
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.
2019-07-22 02:27:45 +02:00
18758c3926 Fix +evil/easymotion for certain keys 2019-07-12 16:24:01 +02:00
feb9799f23 Add f surround key to other lisp modes
This already existed for elisp, but is now available to lisp-mode (CL),
clojure and racket.
2019-07-12 01:08:41 +02:00