Commit graph

32 commits

Author SHA1 Message Date
bmag 450da6f204 spacemacs-evil-cursors: make them easy to configure
Motivation: so layers with their own evil states (e.g. treemacs) can also
contain their own cursor configuration

Example usage: `(spacemacs/add-evil-cursor "treemacs" "RoyalBlue1" '(hbar . 0))`
2017-10-15 17:15:23 +03:00
syl20bnr b2eaf9fd30 groovy: update indent-variable-alist to support new groovy-mode 2017-08-28 11:02:44 -04:00
Paul d3cef31ed6 Fix docstring for spacemacs/evil-smart-doc-lookup 2017-07-06 12:29:22 +02:00
syl20bnr e2e532bb49 core: change <function>p to <function>-p suffixes for consistency
Also defined aliases for backward compatibility with `usedp` functions.
2017-07-02 10:09:39 -04:00
duianto 6a84fb3c0e Replace obsolete which-key functions
Problem:
Two which-key functions doc-strings, state that they are obsolete:

(which-key-declare-prefixes KEY-SEQUENCE REPLACEMENT &rest MORE)
This function is obsolete since 2016-10-05;
use ‘which-key-add-key-based-replacements’ instead.

(which-key-declare-prefixes-for-mode MODE KEY-SEQUENCE REPLACEMENT &rest MORE)
This function is obsolete since 2016-10-05;
use ‘which-key-add-major-mode-key-based-replacements’ instead.

Solution:
Replace the obsolete functions.

Searching with `SPC /` through the .emacs.d folder, didn't find any other
occurrences of these functions.
2017-06-15 13:22:13 +02:00
deb0ch 0dbfbd40ed bindings: improve buffers listing bindings
- bind spacemacs-layouts/non-restricted-buffer-list to SPC b B instead
of SPC B b
- rename buffer listing functions in which-key to be more explicit

PR title:

bindings: non-restricted-buffer-list-* to SPC B b instead of SPC B b

PR message:

I don't know what was the thought behind this, but `spacemacs-layouts/non-restricted-buffers-list-*` was alone in its `SPC B` prefix and `SPC b B` was almost free, only used in one layer that I would be surprised if it was widely used (`ibuffer`).

I also renamed buffers listing functions in `which-key` to be clearer for the user. Indeed, I find that names like `helm-mini` are pretty obscure and kind of defeat the purpose of `which-key` and `spacemacs-layouts-non-restricted-buffer-list-blah` was so long that it couldn't even be displayed.

Now the user can choose between `list-buffers` or `global-list-buffers` for listing buffers.
2017-06-12 12:46:35 +02:00
duianto c6fda1a1d4 string-inflection: group which-keys, sort code/doc
Group together the which-key entries that call the same command:
k and - becomes k,-
u and _ becomes u,_

Declare a prefix name for SPC x i, this changes the SPC x entry:
from: "i -> +prefix"
to: "i -> +inflection".

Capitalize the transient state title, so that it matches the other TS titles.

Sort the code and documentation key bindings alphabetically.
2017-06-12 12:32:46 +02:00
duianto fd4b74559c Update which-key popup: key/command grouping
Comment the code and group the keys/commands based on the
which-key section they appear in.

Reduce the width of the listed keys:
By removing spaces around the two dots `..` in the key sequences, and
by removing the modifier keys before the last number in a sequence.

Update the renamed select-window-[1-9] command name, to the new
winum-select-window-[1-9] name.

Combine keys that call the same command.
2017-05-24 09:32:16 +02:00
JAremko 6c5a0b2b14 update docs to the new toc-org format 2017-05-22 18:35:37 +03:00
JAremko c1e4556882 Format and cleanup docs. Fix links. 2017-04-28 23:29:14 -04:00
syl20bnr 3f1bb43597 Move evil-declare-ignore-repeat to evil init function 2017-04-09 17:25:57 -04:00
syl20bnr 378a767a8e evil: add text objects "«" "「" "‘" "“" 2017-04-09 15:49:55 -04:00
bmag f5a736cdc1 Set evil-search-module correctly
- Just setting evil-search-module is not enough. If Evil is loaded already, we
  must call evil-select-search-module as well to actually change the
  key-bindings to use the correct search module.
- If the user didn't set hybrid-mode-use-evil-search-module so it's not bound,
  we treat it as if it was set to nil, to match the documentation and the
  default value of hybrid-mode-use-evil-search-module.
2017-03-13 21:06:07 +02:00
syl20bnr eef1a87e98 Fix evil-search module activation
The search module must be set before requering evil otherwise the variable is
set but it has not effect and `isearch` module is the active module.
2017-02-07 16:53:33 -05:00
deb0ch cfcdb4dabc fix evil-search enabling in evil-state (c7e47de)
There was an error on startup saying that hybrid-mode-use-evil-search-module was
void as a variable.
2017-02-07 16:36:02 -05:00
syl20bnr c7e47de938 evil: enable evil-search search module in evil state.
Add new hybrid variable hybrid-mode-use-evil-search-module to switch evil
search module to its own which is closer to Vim. Default is nil.

Fixes #5101
2017-02-03 19:36:19 -05:00
Somelauw aed1594548 Add more bindings to scroll-transient-state
Move scroll bindings to SPC N
2017-01-14 17:08:57 +02:00
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
Nir Friedman daa1e33f55
Add binding for jump to def'n other window 2017-01-04 19:30:58 +02:00
duianto f5cfa4ad17 replace 9 buffer-to-window entries with one 1..9
Resolves #8038
This replaces the <kbd>SPC b</kbd> buffer-to-window 1 to 9 entries, with just one 1..9 > buffer to window 1..9.
2016-12-24 21:02:53 +02:00
Justin Burkett afa2226051 which-key: Fix transient state descriptions 2016-12-09 19:24:45 -05:00
Justin Burkett c69c3b7684 which-key: Implement combined select window keys
This is @deb0ch's idea and uses the new which-key interface
2016-12-09 19:24:45 -05:00
Justin Burkett 7bf00ad878 which-key: Update usage of replacement alists
See 19186917eb
2016-11-25 12:32:10 +02:00
syl20bnr 62f08d89fb Rename dotspacemacs-ex-key to dotspacemacs-ex-command-key
Also move the configuration to evil init function.
2016-10-09 21:28:09 -04:00
Eivind Fonn 53d2ae4f15 Remove evil-smart-goto-definition 2016-09-14 11:38:14 +02:00
Eivind Fonn 060934a4f0 Add evil-goto-definition as default jumper 2016-09-14 11:34:39 +02:00
Eivind Fonn 928983da47 Refactor jump to definition
This commit defines:

- spacemacs-default-jump-handlers: a list of functions that can jump to
  definition in ALL modes.

- spacemacs-jump-handlers-MODE: a list of functions that can jump to
  definition in MODE.

- spacemacs-jump-handlers: a buffer-local list of functions that can
  jump to definition. This is made up of the values of the two previous
  variables whenever a given major mode is activated.

- spacemacs/jump-to-definition: a function that tries each function in
  spacemacs-jump-handlers in order, and stops when one of them takes us
  somewhere new.

- spacemacs|define-jump-handlers: a macro that
  * defines spacemacs-jump-handlers-MODE, possibly filled with initial
    functions
  * defines a function that is added to the hook of the given MODE
  * binds “SPC m g g” of that MODE to spacemacs/jump-to-definition

This is an attempt to harmonize all the different approaches to jumping.
Specifically,

- Existing intelligent jump packages that work for only a single mode
  should go to the beginning of spacemacs-jump-handlers-MODE. E.g.
  anaconda for python, ensime for scala, etc.

- Packages like gtags that work for several modes (but potentially not
  all) and which is dumber than the intelligent jumpers should go the
  the END of spacemacs-jump-handlers-MODE.

- Packages like dumb-jump that work for all modes should go to
  spacemacs-default-jump-handlers.

In all cases the order of the jump handlers in each list should be from
most to least intelligent.

Fixes #6619
2016-08-22 15:08:25 +02:00
Eivind Fonn 08aeccb5af Add typescript variable for evil-shift-width 2016-08-18 14:34:32 +02:00
Steven Allen 22daaea708 Fix jumping backwards after calling spacemacs/evil-smart-goto-definition
Ensure that the "previous position" mark is set correctly. Credit goes to
@eltechnic0 to figuring this out.

Fixes #4942
2016-08-17 20:39:33 +02:00
Eivind Fonn 8e87132ba7 Fix possibly calling bad code after theme change 2016-07-25 14:00:02 +09:00
bmag 9c16c40724 New macro: define regexp-bound text object 2016-07-05 00:23:16 -04:00
syl20bnr f23ecf0b12 Rename +distribution to +distributions 2016-06-08 22:17:04 -04:00