Commit graph

50 commits

Author SHA1 Message Date
Henrik Lissner
1676cc56e3
config/default: standardize C/M/s-RET behavior
Also enable these to work from normal mode.

Mentioned in #1146
2019-02-03 18:56:07 -05:00
Sean Farley
11b4a3502a bindings: add common comment toggle
This is fairly common in most editors so let's make lives easier.
2019-01-28 23:14:14 -08:00
Sean Farley
febad24a1d bindings: add some more macos behaviors 2019-01-28 23:14:14 -08:00
Henrik Lissner
e9d09d17da
Remove s-x / s-; keybinds 2019-01-28 21:00:41 -05:00
Henrik Lissner
6da148e928
Fix s-q on macos for non-evil users
There's no guarantee evil-quit-all will be defined.
2019-01-28 20:17:37 -05:00
Henrik Lissner
082bdfe865
Add C-RET/C-S-RET aliases for M-RET/M-S-RET 2019-01-22 19:29:13 -05:00
Henrik Lissner
f264a9bc6e
Back to command = super, option = meta on MacOS
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.
2019-01-22 19:29:13 -05:00
Henrik Lissner
a32c5f7869
Move macos super key fixes to meta
And add Option motion keybinds.
2019-01-22 04:11:11 -05:00
Henrik Lissner
1f523dfdd6
Replace global meta keybinds w/ super fixes on Mac
These super keybinds are exclusively to repair conventional behavior for
CMD OS keys.
2019-01-21 22:09:02 -05:00
Henrik Lissner
139ef46956
Also bind s-x to execute-extended-command
Makes M-x harder to miss (in the case where you use multiple computers
with different modifier layouts on their keyboards).
2019-01-21 22:07:58 -05:00
Henrik Lissner
3694b0d411
Standardize M-RET/M-S-RET as an "add new item" key 2019-01-21 22:07:31 -05:00
Henrik Lissner
17c1759457
Revise smartparens doc comments 2019-01-21 21:19:00 -05:00
UndeadKernel
cbd91a4d3e bindings: standardize movement to the start or end 2019-01-21 11:15:39 +01:00
UndeadKernel
4bc5fac0b2 bindings: Mimic MAC window changes withing emacs
The binding applies for evil and non-evil users alike.
2019-01-21 11:15:23 +01:00
UndeadKernel
00ce44a733 bindings: CUA bindings only in evil 2019-01-11 15:09:21 +01:00
Undead Kernel
b0b666b8f5 bindings: default set of bindings for emacs users 2019-01-10 13:52:35 +01:00
Henrik Lissner
ceb06e1948
Fix C-style doc comment pair expansion
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.
2019-01-08 00:38:46 -05:00
Henrik Lissner
93c537e6a7
Revise C-a/C-e/C-u/C-w/C-b/C-f keybinds
+ 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.
2019-01-05 17:53:11 -05:00
Henrik Lissner
46499ec70f
config/default: minor keybind refactor 2018-12-31 15:55:46 -05:00
Henrik Lissner
6d10b9bbdf
Revert to Meta, instead of Super
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.
2018-12-31 15:00:05 -05:00
Henrik Lissner
9f2dff02fa
Rethink config/default & keybindings
+ 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.
2018-12-24 00:04:50 -05:00
Henrik Lissner
9936532ea3
Move auth-sources & mc/list-files
...to move appropriate locations.
2018-12-23 23:16:03 -05:00
Henrik Lissner
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
Henrik Lissner
db4e17d76d
Reindent auth-sources' value 2018-12-05 22:28:37 -05:00
Aria
a5f9b8460a setq auth-sources properly 2018-12-05 15:21:53 +11:00
Henrik Lissner
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
Henrik Lissner
301a01182d
config/default: move ruby sp rules
To group them with other major mode rules
2018-10-06 20:44:25 -04:00
Henrik Lissner
271e7689ae
Don't error when no gpg keys exist 2018-09-25 10:29:57 -04:00
Henrik Lissner
fad1fc8f1b
Resolve GPG keys by user name instead of address #877
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.
2018-09-21 14:06:15 -04:00
Henrik Lissner
5ef94de541 Minor refactor, reformat & comment revision 2018-09-18 21:39:54 -04:00
Henrik Lissner
a9c925c50b
Rename doom*newline-and-indent
To doom*newline-indent-and-continue-comments; to better describe what it
does.
2018-09-14 10:42:09 -04:00
Henrik Lissner
7d3ffdff06
Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
Henrik Lissner
cf55049a17
Disable sp-ruby-*-handler handlers correctly
Reported by @ar1a
2018-07-07 00:32:45 +02:00
Henrik Lissner
633b5b764d
Apply smartparens {} fix to enh-ruby-mode too
Fixes:

  {|} => {
    |
  }

in enh-ruby-mode buffers too

Reported by @ar1a
2018-07-06 15:34:26 +02:00
Henrik Lissner
8a4f15b01c
Refactor smartparens default rules
Move them to config/default, but move single-lang-specific ones to their
respective modules.
2018-06-25 15:54:38 +02:00
Henrik Lissner
b207c4040b
Minor, general refactor 2018-06-07 02:51:46 +02:00
Henrik Lissner
e5a4415d58
General, minor reformatting/refactor 2018-06-02 13:58:04 +02:00
Henrik Lissner
1938a0d253
Enforce encrypted authinfo & store in doom-etc-dir
Plaintext authinfo should not be the default.
2018-06-01 17:10:30 +02:00
Henrik Lissner
1a452b6842
💥 Change first arg of load! macro
load!'s first argument is no longer a symbol (that will cause
void-variable errors now) to save on unnecessary interning and simplify
compile-time logic. It accepts any valid form that evaluates to a string
now.

If you use load!, you need to change its argument to a string!

e.g. (load! +my-module) => (load! "+my-module")
2018-05-27 12:52:28 +02:00
Henrik Lissner
09cb4f6716
Major refactor & optimization of how modules load their packages
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.

In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.

Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.

This gained me a modest ~10% boost in startup speed.
2018-05-25 00:46:16 +02:00
Henrik Lissner
9a2c4f297c
Fix void macro errors after byte-compiling 2018-05-15 03:24:30 +02:00
Henrik Lissner
2712d606c2
config/default: remove unnecessary after! blocks 2018-05-14 20:42:48 +02:00
Henrik Lissner
e44fd886f2
Appease byte-compiler-sama 2018-05-14 20:37:13 +02:00
Henrik Lissner
2b9ade9cc7
config/default: update emacs-snippets config
Package now removes default snippets by itself, no need for us to do it
too.
2018-05-08 01:00:51 +02:00
Henrik Lissner
1983363f9c
config/default: add +default-repeat-{forward,backward}-key options 2018-03-25 22:39:03 -04:00
Henrik Lissner
eacb720a8f
config/default: fix native evil-snipe repeat keys not being disabled 2018-03-20 15:57:21 -04:00
Henrik Lissner
0156c67ad0
config/default: autoload +default/easymotion 2018-03-20 15:57:21 -04:00
Henrik Lissner
1b5758a6da
Minor refactor 2018-03-18 03:36:05 -04:00
Henrik Lissner
800f8c4739
config/default: remove default yasnippet directory
Otherwise, ~/.emacs.d/snippets is always created.
2018-02-15 01:34:12 -05:00
Henrik Lissner
6d7db48dc1
💥 Move :private modules to :config 2018-02-14 23:36:27 -05:00
Renamed from modules/private/default/config.el (Browse further)