Commit graph

326 commits

Author SHA1 Message Date
syl20bnr f1ddbd1f3e move toggle stickyfunc to SPC T S and SPC T C-S 2016-04-01 00:26:20 -04:00
Aaron Jensen ed5bdf9db8 Enable OSX non-native fullscreen on regular builds
The mac port build supports this out of the box, but the version
installed with `brew install emacs --with-cocoa` requires this variable
to be cleared.
2016-04-01 00:26:20 -04:00
d12frosted 98b329e741 move system-is-* function to core 2016-03-31 00:23:59 -04:00
syl20bnr 9368cba427 Update windows transient state docstring 2016-03-24 00:49:46 -04:00
syl20bnr f48b251968 Delete SPC j b and move SPC j u to SPC j b
By convention, jump back should be on `b`, not `u`
Since `SPC j u` is free, move as well `SPC j U` to `SPC j u`.

`SPC j b` for bookmark jump is already available under `SPC f b`
2016-03-21 20:02:56 -04:00
syl20bnr b697571021 Revert default value of hybrid-mode-default-state to normal 2016-03-17 17:43:10 -04:00
Eivind Fonn 6d5f55f09e Fix evil-inner-buffer text object 2016-03-17 09:15:06 +01:00
syl20bnr 50ff429f81 Set hybrid-mode-default-state default value to hybrid 2016-03-16 23:41:45 -04:00
syl20bnr ca5b8be90b New hybrid mode variable hybrid-mode-enable-evilified-state
When non nil then evilified buffer use evilified state, otherwise
they use the emacs state (may put the hybrid state if users get
confused).
2016-03-16 23:34:20 -04:00
syl20bnr 2d61e5304e core: add support for :variables keyword in dotspacemacs-editing-style
Add variable `hybrid-mode-enable-hjkl-bindings` to enable hjkl
navigation in hybrid mode.

example:

dotspacemacs-editing-style '(hybrid :variables
                                     hybrid-mode-enable-hjkl-bindings t
                                     hybrid-mode-default-state 'normal)
2016-03-16 22:43:50 -04:00
syl20bnr c2296f71f8 Put back holy and hybrid in spacemacs base layer
They are not optional
Also fixes some bugs like toggling hybrid mode from holy mode and
toggling off the hybrid mode.
2016-03-16 21:59:44 -04:00
syl20bnr cfdfcfab40 Revert hybrid mode to use an evil hybrid state
To follow with the refactor of the holy-mode which uses the
emacs state of evil mode, the hybrid mode now uses the evil hybrid
state.

We have now a clean symmetry between all the editing styles where each
of them has an associated state:
- vim = insert state
- emacs = emacs state
- hybrid = hybrid state

This gives consistent properties to all editing styles and most
importantly allows to have true isolation of key binding maps. It has
the huge benefit to be easier to explain since now everything can
leverage the evil API regarding key bindings.

Note: Regular Emacs key binding functions can still be used for emacs
and hybrid states so there is no regression with the previous
implementation, we just gain better isolation at the cost of a few
duplicated lines of code which will be easy to update as needed if
evil upstream code changes (this code has been commented with a link
to the upstream code).
2016-03-16 21:30:03 -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
Eivind Fonn ee6e84de10 Enhance compilation keybindings
- Make sure to defer after load of compile
- Use `gr' instead of `g' for recompilation
2016-03-12 17:49:20 +01:00
denin a4ce07dd12 restore evil-binding of 'g' key in a compilation buffer
By default, recompile is bound to 'g' in compilation buffer.
It was rebound to 'r' key.
2016-03-12 17:47:18 +01:00
Fabien Dubosson 68e88df3c8 Correct SPC q D prompt and simplify the function 2016-03-12 17:46:31 +01:00
Eivind Fonn 47789270d9 Don't nest `when' 2016-03-12 17:45:41 +01:00
Muneeb Shaikh 6c17e3bc3a fix #5448: guard nil buffer size 2016-03-11 17:00:13 +05:30
syl20bnr d52eb414bb Remove dotspacemacs-use-ido
Users should now bind ido commands themselves.
2016-03-10 23:13:19 -05:00
ralesi 3f376a431b Prompt to open file literally when opening large files. 2016-03-10 23:13:19 -05:00
sooheon ec3bbd4176 Use evil-define-minor-mode-key over define-key
This keeps the keybinding specific to the visual-line minor mode, and
fixes #5418. Reverting the bindings on the :off toggle is no longer
necessary as well, turning off visual-line-mode will handle it.
2016-03-10 23:12:35 -05:00
Jeremy Bi 343b7ac1d0 projectile: autoload projectile-project-p
Fix #5127
2016-03-09 20:14:21 -05:00
sooheon fa52c93078 Keep escape binding in evil-visual-state default
While seemingly equivalent, this binding change can cause brittle
behavior in at least one case (used in conjunction with
multiple-cursors). Such a highly niche customization would probably be
better in a personal config, unless a case can be made that all
spacemacs users would benefit.
2016-03-09 20:12:48 -05: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
NJBS 9026652dcf Fix scrolling transient state keybindings typo 2016-03-06 19:50:49 -05:00
justbur d28537ec86 evilified: Remove stray bind-map declaration
It looks like it was not removed when the other one in the file was
added.
2016-03-03 20:53:42 +01:00
Eivind Fonn 65702c9285 Fix smart doc and goto rewrite 2016-03-03 20:36:34 +01:00
justbur ca72561bc7 evil: Rewrite smart-doc-lookup and smart-goto-binding
Prefer checking explicitly for the key binding rather that using
condition-case and assuming all errors are related to a missing binding.
2016-03-03 20:30:32 +01:00
justbur 39e06feba9 Use unless-debug version of condition-case
It's not possible to get full backtraces in these instances when an
error is signaled, and I think we should generate full backtraces when
debug-on-error is enabled as a general rule.

I had to make this change at one place to track down the root of problem
2 in #5200.
2016-03-03 20:30:30 +01:00
wliao 7aad1b45ce maps <escape> instead of ESC to quit help-mode
prevents masking M- keys in GUI.
2016-03-01 18:58:18 +01:00
Beau Dacious a54c637480 create align-repeat-backslash command 2016-02-27 14:57:06 +01:00
justbur 5402261456 Improve toggle-maximize-centered-buffer
1. The register name should be a character not a symbol.

2. Combine toggle-maximize-centered-buffer and bzg-big-fringe-mode to
   make new minor mode that combines the two effects.

3. Fix problem where the mode could only be enabled if there was more
   than one window, which makes no sense.

4. Use window-configuration-to-register function
2016-02-25 20:34:40 +01:00
Allen Li 496718ddd8 Fix Window Manipulation Transient State typo 2016-02-25 20:30:24 +01:00
Eivind Fonn 06c35c30ab Re-add yaml-mode as sensitive mode 2016-02-23 20:53:44 +01:00
Robert O'Connor c2f216cbd7 Fixes #5106
Add haskell-mode to the spacemacs-indent-sensitive-modes list; also
makes the lost alphabetical
2016-02-23 20:53:13 +01:00
Ole Jørgen Brønner 21ed08e0d6 Fixed reversed keybindings for comint-previous/next.
k = up = previous, j = down = next
2016-02-23 20:51:47 +01:00
justbur 17ba634021 Fix scroll transient state
Fixes #3450

For some reason, the scroll transient state was trying to reinvent
scrolling halfway up and down a page when these are well supported
operations in evil.
2016-02-23 20:45:53 +01:00
Alejandro Catalina bdd702dfbe evil: enter insert-state only from normal-state 2016-02-23 20:42:59 +01:00
Alejandro Catalina a686fe99ce Fix 0 as prefix arg in paste transient state
When in paste-transient-state, 0 won't exit the transient state and so
it won't take the point to the beginning of line.
2016-02-23 20:40:41 +01:00
syl20bnr 9f93645d1c Require use-package before using it when SPC q D 2016-02-18 23:21:15 -05:00
Fabien Dubosson 1a63e9578b Add restart-emacs functions for debugging
This adds the following functions:

- spacemacs/restart-emacs-debug-init
- spacemacs/restart-stock-emacs-with-packages
2016-02-18 23:08:38 -05:00
justbur 0b997316d0 helm: Move helm-apropos to spacemacs-helm 2016-02-16 23:53:43 -05:00
justbur f6b82ee90d helm/ivy: Use hook to update hjkl navigation
Introduce hjkl-completion-navigation-functions to hold the functions to
disable and enable hjkl navigation for ivy and/or helm. The hook is run
with args to indicate whether to enable or disable.
2016-02-16 23:53:43 -05:00
syl20bnr ae97e1b85c Move eshell cache directory and remove duplicate code for url cache 2016-02-16 23:40:25 -05:00
justbur 85a7cd9b5b Fix toggle-maximize-buffer
Was using the symbol _ as the name of a register when the docs for
register-alist state that the name of a register should be a character.
2016-02-16 22:45:49 -05:00
adrsta feefea4b18 Update align function documentation 2016-02-14 23:39:37 -05:00
Robert O'Connor 4348c17433 Switch “bc”->“bd” and “wc”->“wd”
Also:
- switch spacemacs layouts to the same.
- Add “wD” for ace-delete-window
- switch window dedication toggle to “wt”
- all documentation has been updated to reflect these changes

Closes #5031
2016-02-14 23:09:45 -05:00
Fabien Dubosson 24f0e8cc4b Restart Spacemacs restoring layouts
Fix #5058
2016-02-14 20:59:05 -05:00
Eivind Fonn a111f4802d Don't change scratch major mode if buffer exists 2016-02-10 20:28:03 +01:00
justbur 86ab9e7eeb paste-ts: Change key bindings to C-j/C-k
J was annoying for those who wanted to use join lines right after a
paste.
2016-02-07 14:46:11 +01:00
Eivind Fonn 8d60b15ccf Move projectile-shell-pop to shell layer 2016-02-02 16:42:58 +01:00
Fabien Dubosson 010444cdc7 Add projectile-shell-pop and bind it to SPC p '
This allows to open a shell at project's root
2016-02-02 16:36:39 +01:00
Eivind Fonn 69b14b4950 Fix frame parameter for maximized 2016-02-02 16:30:03 +01:00
MadAnd f506f9a00c Improve frame-fullscreen and maximize-frame toggles 2016-02-02 16:30:03 +01:00
MadAnd a95212dba5 Not re-toggle fullscreen on SPC f e R 2016-02-02 16:30:03 +01:00
justbur 18874c9a3e hybrid-mode: Simplify implementation
Make use of new evil variable evil-disable-insert-state-bindings. This
is better because we are not copying evil code to get hybrid state to
work. We should not need to worry about tracking upstream evil changes
with this version of hybrid mode.

The only effect I can think of with this change is that there is no
longer a distinct hybrid-map, since there is no longer a distinct hybrid
state. This means that, for example, (evil-define-key 'hybrid ...)
will throw an error. You can either use (evil-define-key 'insert ...) or
the preferred (global-set-key ...). The latter is preferred because the
purpose of hybrid mode is to not interfere with Emacs bindings in insert
state.

Use post-init-evil function to load
It's a bit safer than with-eval-after-load, in case evil gets loaded
before its init function is called.

Add entry and exit hooks

Add temporary wrapper to evil-define-key
This is so that calls like (evil-define-key 'hybrid ...) do not fail
after switching over. Instead issue a warning for all such instances and
bind using define-key instead.
Also define evil-hybrid-state-map and make it the parent of
evil-insert-state-map this will prevent calls like (define-key
evil-hybrid-state-map ...) from failing.
These are both temporary and are only intended to smooth the transition
to the new version of hybrid-mode.
2016-02-01 00:20:58 -05:00
justbur 65d92b8595 which-key: Fix replacement for transient-state/body 2016-01-31 23:49:49 -05:00
Eivind Fonn b3b0ecb399 Make buffer and window close bindings consistent 2016-01-31 23:43:23 -05:00
Eivind Fonn 53daa7b198 Some fixes for google-translate
- Don't explicitly list commands (they are autoloaded)
- Move xgl binding from keybindings.el
- Don't explicitly require the default-ui feature (not necessary)
- Set variables in init instead of config (easier to change for users)
2016-01-31 23:22:42 -05:00
bmag 407f98a1c8 Ensure new workspace/layout only shows home buffer
Previous code would show two windows when invoked from a window that is
dedicated to its buffer: the home buffer and the dedicated buffer.
2016-01-31 23:19:39 -05:00
Balaji Sivaraman 2b1ed603dc Change all references of micro-state in codebase to transient-state 2016-01-31 23:04:47 -05:00
Olivier Verdier a68cc58253 escape quits help mode 2016-01-31 23:04:46 -05:00
Fredrik Bergroth 757ffd13e8 Restore window layout when quitting ediff 2016-01-31 23:04:46 -05:00
Steven Allen 820b5d2704 Obey rust-mode indent setting 2016-01-31 23:04:46 -05:00
Igor Avdeev 41284a740b Update recentf after file renaming
Delete old filename from a list and append a new one.
2016-01-31 22:21:16 -05:00
Tu Do 03ec0cb4bb [#4137] Give useful Projectile commands key bindings
helm-projectile-find-file-dwim is equivalent to find-file-at-point,
but operate in project scope and does not require full path.
2016-01-31 21:48:52 +01:00
syl20bnr a000a03349 Move report error to SPC h I
h for help and I for issue
2016-01-26 01:21:02 -05:00
Fabien Dubosson aa39eb3fd0 Add a command for reporting issue to spacemacs 2016-01-26 01:21:02 -05:00
Xue Fuqiao 9dfc1d93aa Doc fix for spacemacs/show-and-copy-buffer-filename 2016-01-26 01:21:02 -05:00
justbur e97af03ff7 Call new micro-state a transient state 2016-01-26 01:21:00 -05:00
justbur 48846ed824 New version of wind-manip-micro-state doc 2016-01-26 01:21:00 -05:00
justbur 7ed141b7dd hydra: Disable evil-local-mode in the corelv buffer
Otherwise evil calls evil-refresh-cursor which reverts the cursor from
being nil
2016-01-26 01:21:00 -05:00
justbur 4123b19314 which-key: Add rules for new micro-state 2016-01-26 01:21:00 -05:00
justbur dbd9725c39 spacemacs(-base): Translate micro-states to use new macro
1. spacemacs: scroll
2. spacemacs-base: paste
3. spacemacs-base: macrostep
4. spacemacs-base: transparency
5. spacemacs-base: scale-font
6. spacemacs-base: wind-manip
7. spacemacs-base: buffer
8. spacemacs: symbol-highlight
9. spacemacs: move-text
10. spacemacs: zoom-frm
11. spacemacs: evil-numbers
2016-01-26 01:20:59 -05:00
justbur 90df083ad3 spacemacs-base: Add hydra package 2016-01-26 01:20:59 -05:00
Eivind Fonn 3271dbcf0f Move rspec popwin config to ruby layer 2016-01-23 17:08:18 +01:00
Josh Cass 94e08aa401 Use popwin for rspec-compilations
With the introduction of `rspec` support in version 0.105.0
tests run with rspec launch in their own `rspec-compilation`
which is not managed in `spacemacs-base/init-popwin` causing
those compilations to open a new buffer and take over an exisiting
window.

It is preferable to have the test compilation open in a popwin
that does not disrupt the current state of a workspace layout and
takes advantage of the full width of the current editor view
so it's easier to read. Popwin is also nice because it is easier
to dismiss with a simple `C-g` or `SPC w p p`.
2016-01-23 17:04:59 +01:00
JAremko 574dffbeeb added follow mode key binding 2016-01-23 14:11:20 +01:00
person808 a956235678 Move regex for useful terminal buffers to shell layer.
Also add regex for M-x shell.
2016-01-22 15:53:13 +01:00
justbur e519dad118 evil: Bind evil-jump-forward for GUI
Bind to <C-i> so that evil-jump-forward works in the GUI and we don't
rebind TAB in the terminal.

Bind <C-i> for the evil-jumper package too
2016-01-21 16:12:08 +01:00
justbur 2f94ada233 spacemacs-base: Add evil-ediff
This is a simple package I wrote to add a few vim-like bindings to ediff
and make the help popup reflect these bindings.
2016-01-18 00:35:40 -05:00
Balaji Sivaraman ab109b1eb2 Add keybinding and evil-ex-cmd string for spacemacs/new-empty-buffer fn 2016-01-18 00:31:21 -05:00
Fabien Dubosson 123844cd51 Add text justification bindings 2016-01-18 00:25:31 -05:00
Diego Berrocal e7e7f75d3f Add evil-scroll-line bindings to evilified state
Unless there is a valid reason why these shouldn't be included I think
we should keep them. after all we can yank with `v y` right?

squash! Add documentation
2016-01-17 23:56:56 -05:00
syl20bnr 052e8dfc08 Move helm and search key bindings
Key bindings should not be choosen given a package name, some helm
key bindings are under `SPC h` which are corrected the following way:

SPC h l for helm-resume to SPC r l (resume last completion)
SPC s l for last-search to SPC r s (resume search) (SPC s l is still
available)
SPC h L for helm-locate-library to SPC s L

Resolve #4592
2016-01-13 08:32:16 -05:00
Fabien Dubosson ad448d6683 Add helm-apropos on SPC h d d
Bind it to `SPC h d d` as it's a way to describe a lot of elements:
- commands
- functions
- classes
- generic functions
- variables
- faces
- helm-attributes

Is also bound on `SPC F1` and will also stay there.
2016-01-13 00:40:25 -05:00
justbur 36a0756211 spacemacs-base: Add back view-emacs-news
Some how it got lost moving helm into its own layer.
2016-01-12 08:19:47 -05:00
syl20bnr a5857b3d7c Optimize SPC j prefix
`SPC j j` is now for avy-goto-char (SPC SPC in 0.105)
`SPC j J` is for avy-goto-char-2
`SPC j s` is for splitting strings or sexps
`SPC j S` is for splitting strings of sexps, insert new line and indent
`SPC j n` is to split line at point, insert new line and indent
2016-01-12 01:17:41 -05:00
Fabien Dubosson 78b8d939f4 Add spacemacs/describe-last-keys 2016-01-11 22:01:01 -05:00
Fabien Dubosson 2441b5861f Remove duplicate definition of SPC hds 2016-01-11 22:01:01 -05:00
syl20bnr 438bce3d29 Move request package storage directory to .cache 2016-01-11 21:59:34 -05:00
syl20bnr 046d86800c Clean copyrights and update for year 2016 2016-01-11 21:42:17 -05:00
syl20bnr ce33918714 Use spacemacs/add-to-hooks 2016-01-11 01:15:47 -05:00
Eivind Fonn d8833215b0 Make scratch buffer major mode configurable 2016-01-11 01:13:10 -05:00
justbur c5528a5031 ivy: Minor changes to make more consistent w/ helm
1. Ask for intial directory in "file" search commands
2. "ry" -> counsel-yank-pop (browse kill ring)
3. Shorten which-key description for project search commands.
2016-01-11 01:13:09 -05:00
Fabien Dubosson a2ad920216 Enable hl-todo in text-mode derived buffers 2016-01-10 14:24:30 +01:00
syl20bnr ea333f7282 completion: move hjkl function to layers and treat ivy as a package 2016-01-09 15:29:37 -05:00
justbur 4872c711a2 spacemacs-ivy: Fix imenu jumping for ivy split
Make spacemacs/jump-in-buffer aware of ivy and move jI into the
spacemacs-helm layer
2016-01-09 13:36:03 -05:00
justbur 00b25656a0 spacmacs-helm: Move binding for hdm
For some reason this fixing a problem with helm refusing to load
2016-01-09 13:36:03 -05:00
justbur e4b865d88f ivy: Move persp keybindings out of projectile init
Now in post-init functions in the spacemacs-layout layer

Cleans up f74fbc6baba044b559917f6b15cb6f91934cdeee
2016-01-09 13:36:03 -05:00