Commit graph

32 commits

Author SHA1 Message Date
syl20bnr 9d0558992c layers directory: create new categories
+chat
+checkers
+emacs
+intl
+os
+pair-programming
+tags
+theme
+web-services
2016-03-23 21:39:43 -04:00
syl20bnr 82fdd9a511 Use evil in holy-mode
Motivation

While disabling Evil in holy-mode makes its implementation shorter and
sounds elegant on the paper, in practice it puts a big burden on the
configuration parts which need to know if Evil is enable or not. This is
a bad separation of concerns and the bunch of fixes that we were forced
to do in the past weeks shows this issue. Those fixes were about
removing the knowledge of the activation of Evil by implementing new
dispatching functions to be used by layers, this is cumbersome and makes
Spacemacs layer configuration more subtle which is not good. There was
additional bad consequences of the removal of Evil state like the
impossibility to use Evil lisp state or iedit states, or we would have
been forced to implement a temporary activation of Evil which is
awkward.

Instead I reintroduce Evil as the central piece of Spacemacs design thus
Evil is now re-enabled in holy-mode. It provides the abstraction we need
to isolate editing styles and be able to grow the Spacemacs
configuration coverage sanely. Layers don't need to check whether the
holy mode is active or not and they don't need to know if Evil is
available (it is always available). We also don't need to write
additional dispatching functions, this is the job of Evil, and I think
it provides everything for this. Ideally configuration layer should be
implemented with only Evil in mind and the holy-mode (and hybrid-mode)
should magically make it work for Emacs style users, for instance we can
freely use `evil-insert-state` anywhere in the code without any guard.

Evil is now even more part of Spacemacs, we can really say that
Spacemacs is Emacs+Evil which is now an indivisible pair. Spacemacs
needed this stable API to continue on the right track.

While these changes should be rather transparent to the user, I'm sorry
for this experimental period, I failed to see all the implications of
such a change, I was just excited about the possibility to make Evil
optional. The reality is that Spacemacs has to embrace it and keep its
strong position on being Emacs+Evil at the core.

Implementation

- insert, motion and normal states are forced to emacs state using an
advice on `evil-insert-state`, `evil-motion-state` and
`evil-normal-state` respectively. These functions can be used freely in
the layer configuration.
- A new general hook `spacemacs-editing-style-hook` allow to hook any
code that need to be configured based on the editing style. Functions
hooked to this hook takes the current style as parameter, this
basically generalize the hook used to setup hjkl navigation bindings.
- ESC has been removed from the emacs state map.
- Revert unneeded changes
  - Revert "evil: enter insert-state only from normal-state"
    commit bdd702dfbe.
  - Revert "avoid being evil in deft with emacs editing style"
    commit f3a16f49ed.

Additional changes

All editing style packages have been moved to a layer called
`spacemacs-editing-styles`

Notes

I did not have time to attack hybrid mode, I should be able to do it
later.
2016-03-13 21:16:55 -04:00
Muneeb Shaikh 6fee0a3666 change insert map only for vim editing style
For now, prevent cluttering hybrid insert state map until there's
cleaner solution.
2016-03-09 20:01:37 -05:00
Eivind Fonn a8bd6dcb23 Disable global-hl-line-mode in shell-like buffers 2016-03-05 21:02:15 +01:00
Alejandro Catalina bdd702dfbe evil: enter insert-state only from normal-state 2016-02-23 20:42:59 +01:00
Bailey Ling 8ac2cd1c6f scope the aliases under eshell so they are not defined globally 2016-02-23 11:39:40 +01:00
syl20bnr ae97e1b85c Move eshell cache directory and remove duplicate code for url cache 2016-02-16 23:40:25 -05:00
Eivind Fonn 8d60b15ccf Move projectile-shell-pop to shell layer 2016-02-02 16:42:58 +01:00
Eivind Fonn dfd7213095 Set the correct shell-pop size variable 2016-01-31 23:25:10 -05:00
Balaji Sivaraman 2b1ed603dc Change all references of micro-state in codebase to transient-state 2016-01-31 23:04:47 -05:00
Xue Fuqiao 4958f7fc10 Fix "the point" problems
Point is a proper name when it refers to the current editing location.
Moreover, point designates a place *between* two characters (or before the first
character, or after the last character), rather than a particular character.

References:

* http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00414.html
* https://www.gnu.org/software/emacs/manual/html_node/elisp/Point.html#index-point
2016-01-31 21:48:52 +01:00
syl20bnr 49f11ca0b0 Sort packages in some packages.el 2016-01-26 01:21:02 -05:00
Eivind Fonn 44fd52d83b Register shells as REPLs 2016-01-22 16:31:47 +01:00
Eivind Fonn a47777696e Some eshell cleanup
- Move keybindings to named init function instead of lambda
- Autoload C-d binding from em-rebind
2016-01-21 22:11:49 +01:00
james sangho nah 1d6df486ec Quit shell only if there is no char left to delete
Addressing #4630. C-d is now bound to eshell-delchar-or-maybe-eof which
checks if there is a char after the point. If so, it performs the normal
delete-char, otherwise eshell-life-is-too-much.
2016-01-21 22:07:06 +01:00
syl20bnr 046d86800c Clean copyrights and update for year 2016 2016-01-11 21:42:17 -05:00
justbur b0ee301845 layers: Conditionally load helm packages
Only use them when the spacemacs-helm layer is used.
2016-01-09 13:36:03 -05:00
syl20bnr 4ed2229c5c shell: move deactivation of smooth-scrolling to shell layer 2016-01-08 21:27:26 -05:00
Eivind Fonn 1d722b29ac Defer eshell-z 2016-01-08 21:41:42 +01:00
Diego Berrocal ee6968863d Add eshell-z to eshell (awesome autojump) 2016-01-08 21:38:08 +01:00
Diego Berrocal 734cf98b3e Add eshell keybindings for exiting and clearing
Define an eshell clear function and avoid duplicates for history in
eshell
2016-01-04 00:07:46 -05:00
Diego Berrocal 01d3c007cc Fix #4279 Comint mode showing weird symbols
Before:
[![alt](https://i.imgur.com/4BKayT5.png)](https://i.imgur.com/4BKayT5.png)

After:

[![alt](https://i.imgur.com/AGg3mt9.png)](https://i.imgur.com/AGg3mt9.png)
2016-01-03 22:23:12 -05:00
Allen Li 7e60d534d8 Add term binding for CTRL-Z
Add a binding for stopping jobs in term buffers.
2015-12-04 00:00:14 -05:00
syl20bnr 64caca76c3 shell: remove usage of use-package for comint 2015-11-29 22:34:55 -05:00
Diego Berrocal 07e5a0ca9d Protect prompt in comint-mode 2015-11-29 12:14:01 +01:00
justbur 9befd20a1a layers: Transition to new key bindings functions
Removes dependence on evil-leader centralizing control over the method
of key binding in core-keybindings.el
2015-11-21 18:22:51 +01:00
Eivind Fonn de1cce8ba6 Add C-j and C-k history commands in shells
Based on work by mijoharas
2015-11-14 00:37:21 -05:00
Eivind Fonn 72f4fed57f Fix eshell linum-mode check 2015-11-13 11:59:01 +01:00
Diego Berrocal 23f43af23c Disable line numbers in shells 2015-10-25 10:38:18 +01:00
Allen Li 1f3a6a0941 Fix SIGQUIT bug #3324
This hook is duplicating the functionality of a multiterm hook, causing
it to be called after the multiterm hook has already switched to a
different buffer, thus quitting a job in the latter buffer.
2015-10-12 09:32:39 -04:00
Eivind Fonn 21146f4fed Fix #2390
Sets up company in eshell-mode-hook during the init phase so that it can
be reliably disabled in user config.
2015-09-14 15:09:28 +02:00
syl20bnr 6b33031dc5 core: dotspacemacs-distribution, spacemacs-core layer and rename contrib
- Rename contrib directory to layers
- Add new variable dotspacemacs-distribution
- Move spacemacs layer to layers/!distribution
- New layer spacemacs-core in layers/!distribution
- User can now set dotspacemacs-distribution to spacemacs or
  spacemacs-core (default spacemacs)

spacemacs-core is very lightweight layer sufficient to build upon
spacemacs.
2015-09-07 23:44:43 -04:00
Renamed from contrib/shell/packages.el (Browse further)