Commit graph

38 commits

Author SHA1 Message Date
Henrik Lissner
1b779bf716
Fix evil ex fname modifiers consuming char just before #/%
':e test-%:t.el' in filename.el should open test-filename.el, but
instead opened testfilename.el.
2020-01-20 19:14:25 -05:00
Henrik Lissner
dcb0b6042e
Ensure evil-easymotion is lazy-loaded
The evilem-create calls were pulling it in early, at startup.
2019-12-27 01:54:01 -05:00
Henrik Lissner
d1f4a77fbb
Fix vestigial reference to old help-search-headings fn 2019-12-26 16:50:49 -05:00
Henrik Lissner
adc8cba14b
Revise docstrings & minor reformatting 2019-12-26 01:41:44 -05:00
Henrik Lissner
baae6b1711
Rename +evil/paste-preserve-register => +evil/alt-paste
Now does the invers of evil-kill-on-visual-paste
2019-12-21 03:59:46 -05:00
Henrik Lissner
27cabea6b6
Fix gs in org-mode #2218
Also makes +evil/easymotion generic; it can now be moved to any key, and
new keys can be added to the <easymotion> event, rather than having to
wait for evilem-map to become available.

Also fixes +org/goto-visible if used before avy is loaded.

Relevant to #1672
2019-12-20 13:40:06 -05:00
Brian Wignall
199a6fab79 Fix typos 2019-12-01 22:31:19 -05:00
Henrik Lissner
26c8f5c6ef
Bytecompiler bytecompiler, won't you shut up 2019-11-23 01:21:25 -05:00
Henrik Lissner
449ddb986c
Minor refactors & reformatting across the board 2019-11-15 22:17:31 -05:00
Henrik Lissner
03e9dc1daf
Follow up on 64222c69c
To fix cases where comment-line-break-function's first argument isn't
optional.
2019-11-15 22:17:31 -05:00
Henrik Lissner
46bea60ad3
Add :Read ex command & 'SPC i p' keybind
This can be used to extract paths from evil-ex style paths. e.g. the
following inserts the stdout into the current buffer (assuming we're in
~/some/project/filename.c):

  :R!echo %:P      ~/some/project
  :R!echo %:t      filename.c
  :R!echo %:e      c
  :R!echo %:r      filename
  :R!echo ~/another/project/%:t:r.h
    ~/another/project/filename.h
  :R %             contents of current file

http://vimdoc.sourceforge.net/htmldoc/cmdline.html#filename-modifiers
has a full list of vim filename modifiers. Doom doesn't support all of
them, but it does support most of them.
2019-11-15 22:17:30 -05:00
Henrik Lissner
1d09e4655a
Fix split-window & update docstring 2019-10-29 18:27:19 -04:00
Henrik Lissner
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
Henrik Lissner
9e2b0c6332
editor/evil: fix autoload for +evil:whole-buffer-textobj 2019-10-28 23:23:13 -04:00
Henrik Lissner
83387d89e9
editor/evil: move vim-unimpaired motions
To the unimpaired library
2019-10-26 00:37:51 -04:00
Henrik Lissner
f2b77fe2c0
Add whole-buffer (g) and defun (f) text objects 2019-10-26 00:37:12 -04:00
Henrik Lissner
7654764713
editor/evil: update docstring for +evil:align* commands 2019-10-10 21:38:08 -04:00
Henrik Lissner
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
Henrik Lissner
a3fa1e07b1
Refactor doom/kill-*-buffer commands 2019-10-10 16:11:42 -04:00
Henrik Lissner
07380af819
Add gy operator for yanking without indentation
Copies

   (a
    b
    c)

As

(a
 b
 c)
2019-10-10 16:11:41 -04:00
Henrik Lissner
e10cd8cf2e
Insult byte-compiler's mom
Yeah, that shut him up.
2019-09-20 23:10:53 -04:00
Henrik Lissner
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
Henrik Lissner
20d15c685e
Fix :narrow ex command 2019-09-14 01:56:38 -04:00
Henrik Lissner
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
Henrik Lissner
d106272574
Fix ]f/[f (next/previous file) motions 2019-07-22 23:51:12 +02:00
Henrik Lissner
88813ff196
Minor reformatting across the board
Gotta

Look

Nice
2019-07-22 22:34:08 +02:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
18758c3926
Fix +evil/easymotion for certain keys 2019-07-12 16:24:01 +02:00
Henrik Lissner
403c2e1b5d
Add < surround key
ysiw<testRET will transform

  String

To

  test<String>

In C-style major modes that use angle bracket generics/templates (e.g.
C++, rust, C#, java, swift, and typescript).
2019-07-12 01:07:23 +02:00
Henrik Lissner
9a02bd8ac8
Minor refactors across the board
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00
Henrik Lissner
855ff34e2c
Port more next/previous motions from vim
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
2019-06-17 12:37:19 +02:00
Henrik Lissner
61502d7e31
Reformat editor/evil/autoload/evil library 2019-06-17 12:05:54 +02:00
Henrik Lissner
0b1ecb8105
editor/evil: port vim-unimpaired keybinds
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.
2019-06-16 19:16:22 +02:00
Henrik Lissner
0f06b7702e
Remove which-key dependency from +evil/easymotion 2019-05-12 00:56:17 -04:00
Henrik Lissner
a4c5396558
Add better-jumper
Replaces evil's jumplist; makes its functionality available for non evil
users.
2019-04-24 18:16:04 -04:00
Henrik Lissner
77e4cc4d58
💥 Remove :feature category
: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.
2019-04-24 18:16:04 -04:00