Commit graph

326 commits

Author SHA1 Message Date
syl20bnr e0b3f5e1de spacemacs-base: enable hl-todo only when needed 2015-12-07 22:59:14 -05:00
Fabien Dubosson 6def1a480b Use hl-todo for TODOs/FIXMEs highlighting
The current way to highlight TODOs is `spacemacs/highlight-TODO-words`
which is a spacemacs' hard-coded function.

This commit changes it for the `hl-todo` package. This imply:

- More keywords are supported out of the box.

- Keywords are associated to faces, so they are shown in different
  colors.

- Keywords are stored with their faces in a list, so it's easier for
  users to add their own keywords and faces (as contrary to a regexp).

- It is possible to disable highlighting by simply excluding the
  package.
2015-12-07 19:39:38 +01:00
Fabien Dubosson ec8250ea1d Move jump-in-buffer to SPC s j
After a discussion on gitter with @TheBB and @syl20bnr, `jump-in-buffer`
is moved from `SPC s L` to `SPC s j`.
2015-12-07 13:12:10 +01:00
syl20bnr 5104593e89 spacemacs-base: swap SPC s l and SPC s L
SPC s l to bring last search buffer is a powerful binding, let it take
the easier binding.
2015-12-06 23:20:46 -05:00
syl20bnr 0438ee43cf evilified-state: better tag for evilified state 2015-12-06 01:06:41 -05:00
syl20bnr 6fd2af2af3 evilified-state: support for magit remap entries in section maps
Add :pre-bindings keyword argument used to restore explicit key binding
in section maps.
2015-12-06 01:04:13 -05:00
syl20bnr 085d8f150a evilified state: fix visual state
reintroduce the pre-command hook which is required for visual state
borrow code from evil-magit to fix ESC bug in visual state in magit buffers
2015-12-05 23:13:40 -05:00
justbur 899123258a keys: Don't specify C-i as a binding key
(kbd "C-i") == (kbd "TAB") so for consistency sake we always bind to TAB
by convention.
2015-12-05 13:18:37 -05:00
vijaykiran d6be41a4e8 Fix Latin function name
Apparently ` in-nominus-patris-et-filii-et-sipritus-sancti` should be
`in-nomine-patris-et-filii-et-sipritus-sancti`

See: https://en.wikipedia.org/wiki/Trinitarian_formula
Via: https://twitter.com/PeterHilton/status/672133909795196928
2015-12-03 23:54:15 -05:00
Eivind Fonn 4870030ba1 Auto-set evil-shift-width based on mode settings 2015-12-01 02:19:56 -05:00
justbur 81765e9f8f keys: Fix #3927
Use new bind-map option to override minor-mode maps with the emacs
leader key.
2015-12-01 01:22:53 -05:00
Allen Li 4321fccb05 Fix issue #3978
Duplicate prefix maps when evilifying maps to fix prefix binding getting
shared and overwritten between maps.
2015-12-01 01:18:01 -05:00
syl20bnr 97ae903317 evilified-state: remove unnecessary pre-command-hook 2015-12-01 00:46:19 -05:00
syl20bnr 1e6e4023e8 evilified-state: handle minibuffer
Fix isearch not working with evilified keys.
Requires last version (3.11 or above) of evil-escape to be fully
functional.
2015-11-30 11:30:18 -05:00
justbur 648a4e9937 keys: Fix #3981
Make bind-map use default behavior of evil-leader, which used local
state maps for global bindings.
2015-11-29 23:21:09 -05:00
Chris Perkins d99259bcd5 Add some missing which-key prefixes 2015-11-29 12:12:43 +01:00
syl20bnr a19c0f3d24 core: remove spacemacs/set-key funcs and add a new pre-command-hook
This pre-command-hook translates the special key to the corresponding
emacs function key. This effects only happens in terminal, this hook is
a no-op in GUI.

By doing this we attempt to bring more consistency between the GUI
and the terminal regarding TAB and RET keys.
2015-11-28 23:11:48 -05:00
syl20bnr d5233a9706 core: new spacemacs function to set keys
spacemacs/set-key
spacemacs/set-key-for-state

These functions find normalized keys which should handle as sanely as
possible the GUI and the terminal.

See docstring of spacemacs//normalize-key for more info.
2015-11-28 00:13:31 -05:00
Caleb Meyer 7ea379dbde Changed hotkeys for processes and packages. Fixes #3507.
This commit changes:
<leader> a p from proced to list-processes
<leader> a P from paradox-list-packages to proced
and <leader> a k to paradox-list-packages.
2015-11-27 10:32:51 +01:00
Eivind Fonn 7adca30aeb Fix void variable error: smartparens-strict-mode 2015-11-26 23:25:48 -05:00
syl20bnr b540b15afe Move describe-keymap to SPC h d K and document it 2015-11-22 22:31:29 -05:00
justbur 53e2c9ac27 layers: Fix leader key in some modes
Specifically need to be concerned with modes that make their maps
overriding.

 1. dired
 2. evil-magit
2015-11-21 18:22:51 +01:00
justbur e1e850f179 core: Assume all which-key funcs available now 2015-11-21 18:22:51 +01:00
justbur 4e25b7609c spacemacs-base: Add help-fns+
Adds useful help functions like describe-keymap.
2015-11-21 18:22:51 +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
justbur ee6a486d4c core: Add new set-key functions to core-keybindings
Set up to use bind-map instead of evil-leader for leader key
functionality.

Alias evil-leader funcs and remove package
2015-11-21 18:18:01 +01:00
Eivind Fonn e7fbc84ff0 Remove package guards for evilified
See discussion in #3879
2015-11-21 11:07:14 +01:00
kr5x 05a40a2ee2 holy-mode: fix #3876 2015-11-19 12:36:03 +01:00
syl20bnr 629d736b79 core: add package keyword :protected
A protected package cannot be uninstalled nor excluded.
2015-11-19 00:53:57 -05:00
syl20bnr e3df025eff evilified-state: fix tests and rename library to evil-evilified-state 2015-11-19 00:24:27 -05:00
justbur b294461957 evilified-state: Make into local package 2015-11-18 23:35:01 -05:00
Eivind Fonn a13486d2d2 Delimit TODO keywords as words
words like “HACKER” becoming partially highlighted
2015-11-18 16:32:14 +01:00
David Hashe 16d6b0363c Switch mode-line toggle meanings 2015-11-17 15:31:02 +01:00
Fabien Dubosson 471fce6106 Change behaviour of [=] [0] in zooms
As proposed in #2144, Use [=] as an alias of [+], and use [0] instead
for resetting the zoom.

Add a missing `q` binding/documentation.

Close #2144
2015-11-16 20:51:06 +01:00
Fabien Dubosson 98fa5e8d7c Make dired "guess" target directory
Make dired "guess" target directory for some operations, like copy to
directory visited in other split buffer.

Close #2835
2015-11-16 20:51:06 +01:00
Fabien Dubosson 00d21bb69f Add SPC h SPC as an alias of SPC f e h
Add `SPC h SPC` to access helm-spacemacs. Mnemonic
is **h**elp **SPC**macs. As suggested by syl20bnr on #2145.

Close #2145
2015-11-16 20:42:12 +01:00
Eivind Fonn bd2e847a33 Move which-key top level to SPC hk
…and helm-make to SPC cm
2015-11-16 16:21:24 +01:00
Eivind Fonn 58f17f7b8a Fix helm microstate 2015-11-15 10:25:40 -05:00
justbur b82fb4cee8 spacemacs-base: Fix paren problem 2015-11-15 08:44:26 -05:00
Eivind Fonn f6eb4f4290 Document SPC h h binding and move to init function
Also remove hl-anything docs
2015-11-15 12:24:49 +01:00
justbur b3e24604a1 Add bindings for which-key-show-top-level
This is a function that shows unprefixed bindings
2015-11-15 12:20:23 +01:00
Christoph Paulik 9726033515 Don't use ido for sudo-edit of new files and bind key 2015-11-15 12:19:25 +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 38e48aa95d Highlight TODO keywords in all prog modes
Also make the colon optional
2015-11-14 00:34:05 -05:00
Sebastian Wiesner a4882308a5 Move lorem ipsum package to il
Spacemacs already has the "i" prefix for insertion, why do we also need
a separate prefix "xi" for “text insertion”?
2015-11-14 00:33:46 -05:00
Christoph Paulik d1c8e4b9f7 Disable projectile-caching by default.
- Default projectile settings are to disable caching when indexing
  method is `alien. So setting the indexing method should be enough.
- On windows we keep the 'native method unless find is found
2015-11-14 00:32:43 -05:00
Joe Hillenbrand 3b6fd59245 Add SPC c q to close the compilation window
I found it annoying to have to re-navigate to the *compilation* window
and close it after every time I compile with `SPC p c`.

This patch adds a binding to make closing this window fast and easy.

Also a little bit of clean up.
2015-11-13 13:55:53 +01:00
Rich Alesi 2a2505de49 Allow restart-emacs to work with persistent-server
Allow `restart-emacs` to work when `dotspacemacs-persistent-server` is enabled.
2015-11-13 13:55:05 +01:00
Eivind Fonn 88c019d4d6 Fix helm-spacemacs package action 2015-11-12 10:49:31 +01:00
Eivind Fonn a991927288 Beautify helm-spacemacs 2015-11-11 23:01:54 +01:00
Muneeb Shaikh 647ca88008 evilify package menu 2015-11-11 21:30:17 +01:00
syl20bnr 3ff39f10e4 layouts: move SPC l p to SPC p l and bind SPC p to previous layout 2015-11-10 23:39:21 -05:00
geksilla c39e8a9e53 Switch between columns layout toggle golden-ratio.
While columns layout change between 2 and 3 golden-ratio-mode toggle but
should not.

Fixes syl20bnr/spacemacs#3750.
2015-11-10 22:48:56 +01:00
Eivind Fonn b779846d14 Properly honor helm setting 2015-11-10 08:09:19 +01:00
Eivind Fonn a9e15236b2 Enhance default selection of face in helm-faces
Use symbol under point if no face
2015-11-09 18:55:53 +01:00
Muneeb Shaikh b5dbcf5027 Fix helm-faces to select face under point 2015-11-09 18:48:23 +01:00
Muneeb Shaikh 17f6225c5d Allow last-search-buffer to resume last search even if no saved search
With this patch, it's possible to resume last search done with ag even
if there's no saved search

Fixes #3707
2015-11-09 18:47:51 +01:00
Eivind Fonn d14f10e47d Override evil mouse support in helm (#3700) 2015-11-09 13:05:29 +01:00
syl20bnr aed1811f76 perspectives: big refactoring
- Rename micro-states to "layouts"
- Rename some functions to include "layout" instead of "perspective"
- cleanup variables
- move functions to funcs.el
- move package specific stuff to post-init functions
- changes key bindings
- micro-state documentation rewrite
- change format of the layouts line in the micro-state doc
- defer loading of persp-mode which loads with `SPC l`
- always display the spacemacs home buffer with no switch
- various fixes
- various new bugs :-)
2015-11-09 00:36:09 -05:00
Eivind Fonn 0567f5cdac Fix spacemacs/kill-other-buffers 2015-11-03 13:53:10 +01:00
ralesi 500c22e3c5 Helm locate automatically sets the locate command
Can't check simply for executable, as `helm-locate-set-command` is
always run.
2015-11-03 00:00:55 -05:00
syl20bnr b405752f6c Remove global infix in dotspacemacs-global-line-numbers
I feel that it is not needed because it makes not a lot of sense to
have it non global since it is a dotfile variable.

Also remove ' from the docstring for consistency.
2015-11-03 00:00:55 -05:00
syl20bnr 34ce7a0c23 Move lorem ipsum to SPC x i l and declare prefixes
This a rarely used key binding so we can nest it a little bit more and
free some key bindings in the `text insert` namespace.
2015-11-03 00:00:54 -05:00
Eivind Fonn b19e6f139e Add SPC hdF describe-face binding 2015-11-03 00:00:54 -05:00
syl20bnr 25c9d126ab Refactor spacemacs-base/init-recentf
Use progn forms and unify setq expressions.
2015-11-03 00:00:54 -05:00
Peter Duerr fb36140e44 Increase number of stored recent files to 1000 2015-11-03 00:00:54 -05:00
Peter Duerr c2ae7ce9d2 Move recentf initialization to :init section
* In the :config section, the parameters cannot easily be overridden by
  the user.
2015-11-03 00:00:54 -05:00
Eivind Fonn fa975c4c45 Fix helm-spacemacs with new FAQ.org format 2015-11-02 15:05:39 +01:00
Muneeb Shaikh db453acbd6 Customizable whitespace-cleanup
- Default: cleanup whitespace on changed lines
2015-10-31 14:16:31 +01:00
justbur 11f50cf2d8 which-key: Allow evil-operators to popup buffer 2015-10-31 14:05:19 +01:00
Fabien Dubosson c3299f0eca Make linum toggle local and add a variable for global mode
`global-linum-mode` is making line numbers appearing in `*spacemacs*`
and `helm` buffers, what is annoying.

This change make the linum `SPC t n` toggle buffer-local, and add a
customization variable in `.spacemacs` to enable line numbers globally.
«Globally» here as to be understood as «in `prog-mode` and `text-mode`».
2015-10-29 19:30:06 +01:00
Sebastian Wiesner 12aa53fc36 Fix debug on error toggle
Add :status option and manage :on and :off manually.  Without :status
the message is wrong (always says enabled), and with :status we need an
explicit :on and :off, because otherwise the toggle would always disable
the flag.

Not sure what’s going on here, but this one works correctly now.
2015-10-25 10:50:00 +01:00
justbur e6ede2e49a which-key: Add new smart search description 2015-10-25 10:49:05 +01:00
Fabien Dubosson 81952b0977 Declare spacemacs/write-file as not repeatable
Close #3433.

`evil-repeat` repeat the last action, but ignore calls to `write-file`
or `evil-write`. `spacemacs/write-file` is a wrapper around those two
function, so it should be ignored to.
2015-10-25 10:47:57 +01:00
Eivind Fonn 50e1f3ea3f Move compilation-scroll-output to config.el 2015-10-25 10:46:47 +01:00
Joe Hillenbrand 76b795d17e setq compilation-scroll-output first-error
- https://www.gnu.org/software/emacs/manual/html_node/emacs/Compilation.html
2015-10-25 10:44:48 +01:00
Eivind Fonn e776ada203 Temporarily disable helm-flx for find files 2015-10-24 19:25:11 +02:00
Sebastian Wiesner feeab93a1c Don’t change custom-file if already set
Allows users to change the location of custom-file safely.
2015-10-22 22:10:37 -04:00
Muneeb Shaikh c72199b57d Add restart-emacs on SPC q r 2015-10-21 17:24:48 -04:00
Driftcrow 31e0976742 Fix SPC j k unwanted auto-comment
When the cursor is on a commented line, the next indented line was
commented as well.
2015-10-19 00:22:06 -04:00
Eivind Fonn a5ac542ef1 Add helm-flx
See #3327
2015-10-19 00:00:15 -04:00
justbur 44cb780f25 emacs-lisp: Use auto-compile package
Also add key bindings for compiling and showing the compile log.
2015-10-18 23:59:47 -04:00
Sebastian Wiesner 6652e0d8b8 Add bindings for local variable commands
- fvd: Add a directory variable
- fvf: Add a file variable
- fvp: Add a file variable to property line
2015-10-18 23:56:46 -04:00
justbur c5e01eb781 core-keys: Make TAB more useful in help buffers
In help buffers, TAB in emacs state allows you to jump through the
links. This allows for the same behavior in motion state. This is very
useful for jumping to function definitions.
2015-10-14 00:39:14 -04:00
Fabien Dubosson e5dbfa0032 Add switch-to-scratch-buffer function and bind it
This change add a `switch-to-scratch-buffer` function allowing to – you
guessed it – switch to the `*scratch*` buffer, taking care of creating
it if necessary. The function is bind to `SPC b s`, `b` as it concerns
buffers, and `s` for `scratch`.
2015-10-12 09:34:46 -04:00
Sebastian Wiesner 2b87b3d8ea Use tab-width instead of default-tab-width
default-tab-width is obsolete since Emacs 23
2015-10-10 23:55:52 -04:00
syl20bnr 4df7958115 spacemacs-base: simplify url init func 2015-10-10 23:54:09 -04:00
Diego Berrocal 0be2e58308 Make Gravatar cache go into Spacemacs cache dir 2015-10-10 23:49:37 -04:00
Sebastian Wiesner 41a024c206 Use save-place-mode when available
Emacs 25 defines save-place-mode, to be used instead of
(setq save-place t)
2015-10-10 23:43:44 -04:00
Sebastian Wiesner a3affa6554 Enable bug reference prog mode 2015-10-10 23:26:03 -04:00
syl20bnr 74a717f2bb spacemacs-base: use new sorting function which-key-key-order-alpha
Which sorts the keys like in the READMEs and like the code.
2015-10-10 22:29:39 -04:00
Fabien Dubosson 8d3c59c78f Discard buffer from marker, switch to it when asked 2015-10-09 12:11:24 +02:00
Fabien Dubosson 6442e00b2e Use a temp buffer to read the FAQ in helm-spacemacs
Correct a bug in helm-spacemacs: Whenever a function was needing the
FAQ's candidates in helm-spacemancs (`SPC f e h` and `SPC f e f`), the
`FAQ.org` file was open in a buffer and not closed. This commit corrects
this by loading the content of `FAQ.org` in a temp buffer and switch it
to `org-mode` in order to get the candidates.
2015-10-09 12:11:24 +02:00
Pierre Radermecker f3f88b4d28 Fix #3214: add back split-window-and-switch func
Theses func came back from the old spacemacs/funcs.el file
2015-10-09 12:08:40 +02:00
syl20bnr cdea5716ed spacemacs-core: use new sort function which-key-prefix-then-key-order 2015-10-07 19:26:28 -04:00
Andrew Burkett cb65a9adaf Remove server-kill-buffer from frame-killer 2015-10-07 15:51:40 -04:00
syl20bnr 0cbe01433d Move (setq help-window-select 't) to spacemacs-base 2015-10-07 15:51:40 -04:00
syl20bnr c070f81951 spacemacs-base: add <backtab> binding to go up a directory with helm 2015-10-07 15:51:39 -04:00
justbur bb1ed81aca helm: Backtab to go up directory in helm
The key binding wasn't taken, so I figured it couldn't hurt. There's a
nice symmetry with using Tab to enter a directory.
2015-10-07 15:51:39 -04:00
Fabien Dubosson b1fc99bdee Improve keybindings for text-region counting.
Emacs provides a `count-words-region' which is badly named as it counts
not only words, but also characters and lines. The current keybinding
for this function `SPC x w c' implies it's referring to words only. The
new mapping `SPC x c` is more coherent since it means counting text,
whether it is characters, words or lines. An alias `count-region` is
created to be less confusing in which-key description.

`SPC x w c` being free, `spacemacs/count-words-analysis` is remapped to
it instead of `SPC x w C` to save one keystroke.
2015-10-07 15:51:39 -04:00
Eivind Fonn 1c06e2369c Use helm or ibuffer to provide :ls 2015-10-07 15:51:39 -04:00
Fabien Dubosson 66bd2d326e Improve count-words-analysis output
The `spacemacs/count-words-analysis' function displays results with the
default elisp formatting of associative list. This change improves it by
changing the format to a more human-readable form, and also by ordering
results by frequencies first, and then alphabetically in case of tie.
2015-10-07 15:51:39 -04:00
person808 c1b6293268 Replace eval-after-load with with-eval-after-load.
We now backport the macro for 24.3 so we can use it everywhere.
2015-10-07 15:51:39 -04:00
Yen-Chin Lee 2a983671af Fix some cl-lib function with prefix
Since emacs 24.3, function in cl-lib should with cl- prefix.

Signed-off-by: Yen-Chin Lee <coldnew.tw@gmail.com>
2015-10-07 15:51:39 -04:00
Fabien Dubosson 5e3dbd9234 Add FAQ as a source in helm-spacemacs
Add the `FAQ.org` file as a source in helm-spacemacs (`SPC f e h`).
Define a new keybinding for looking directly inside the FAQ with helm:
`SPC f e f`.

With help from TheBB, thanks!
2015-10-07 15:51:38 -04:00
person808 28c5298f4c Use built-in evil variable to set Y behavior. 2015-10-05 12:17:27 +02:00
Eivind Fonn 273d6b5d11 helm-spacemacs: action to open readme for editing 2015-10-05 12:16:46 +02:00
Eivind Fonn 98380b3f72 Remove dead mode-line code 2015-09-30 15:07:01 +02:00
syl20bnr 14fd2b48e9 New variable dotspacemacs-remap-Y-to-y$ 2015-09-28 23:09:44 -04:00
syl20bnr b256475325 helm-find-files: use C-h and C-l to go up down a directory
Import TheBB configuration into Spacemacs and add `C-S-h` to replace
redefined `C-h` binidng.

Also remove the go up a directory behavior on backspace, now backspace
is a regular backspace.
2015-09-27 10:20:14 -04:00
syl20bnr ae475c06c4 base: move toggles for editing styles
SPC t E e -> emacs
SPC t E h -> hybrid
2015-09-26 11:06:45 -04:00
syl20bnr 48b3fb2cad Improve which-key prefix command names for toggles 2015-09-26 11:06:16 -04:00
syl20bnr 983e569de6 hybrid: redefine evil-insert-state-p
If it has nasty side effects we will just revert it in favor of the
precedent commit.
2015-09-26 00:54:56 -04:00
justbur 90fc25a19c hybrid: Prevent C-SPC toggling visual from hybrid
Redefines the `evil-visual-activate-hook` to add hybrid to the list of
states that don't go into visual state when the mark is activated
2015-09-26 00:45:45 -04:00
person808 a7c4014c3f Add new descriptions for new files in helm-spacemacs. 2015-09-24 00:36:53 -04:00
syl20bnr 5c53427c35 spacemacs-base: Remove outdated comment and sort packages 2015-09-23 23:47:36 -04:00
syl20bnr 7e8c275bc5 Rework editing style toggles
Put the toggles on SPC t E with
SPC t E h -> holy-mode
SPC t E y -> hybrid-mode

Make the mode-line diminished lighter consistent with the key bindings,
so holy is Ⓔh and hybrid is Ⓔy

Add seamless switch between holy and hybrid.
2015-09-23 23:27:51 -04:00
Ben Hayden ea805fdc7a Add diminish for hybrid. 2015-09-23 23:11:56 -04:00
syl20bnr 25ee106bdb Migrate some configuration to new built-in location 2015-09-23 22:02:39 -04:00
syl20bnr 0ab2c89628 evil: remove evil-move-beyond-eol and comment out cursor refresh hack 2015-09-19 18:16:00 -04:00
justbur 89ec2d7096 Add back core-keys: Rewrite emacs-leader handling
Brings back the changes made in
dad786bc8d with an additional fix for
evil-org whose config was unbinding important leader keys in org-mode
2015-09-19 01:07:26 -04:00
Chris Grindstaff 88daf79ad1 Update config.el
Fix spelling
2015-09-19 01:00:25 -04:00
syl20bnr 220b15a734 Revert "core-keys: Rewrite emacs-leader handling"
This reverts commit dad786bc8d.
2015-09-17 23:41:48 -04:00
justbur dad786bc8d core-keys: Rewrite emacs-leader handling
This is how evil-leader gets `SPC m` to work for mode specific bindings,
and we need to mirror this step for `M-m`. This is big change, but in
order for `M-m` to work properly we need to remap it to the mode-map
whenever possible.
2015-09-17 22:35:51 -04:00
Eivind Fonn 41459bea12 Set evil-move-beyond-eol to nil for now 2015-09-17 22:05:04 +02:00
Robert O'Connor 3f2e885811 Rename spacemacs-core to spacemacs-base
Per the discussion in #3002. A comment in #3047 prompted this PR.
2015-09-16 21:22:35 -04:00