Commit graph

148 commits

Author SHA1 Message Date
bmag a1c02ba323 dsm-line-numbers: support parent modes, fix mode restriction
Specifying parent modes (e.g. prog-mode) in :enabled-for-modes and
:disabled-for-modes keys in dotspacemacs-line-numbers catches derived
modes (e.g. c-mode) as well.

Fix bug where an empty :disabled-for-modes and a non-empty :enabled-for-modes
enabled line numbers everywhere, instead of only in modes specified in
:enabled-for-modes. (see https://github.com/syl20bnr/spacemacs/issues/8482)

Add auxiliary function spacemacs/derived-mode-p, similar to derived-mode-p but
takes a major-mode as an argument instead of using the current major-mode.
2017-03-13 21:04:00 +02:00
duianto 443df5dbd5 Update bitbucket evil urls to github evil urls
The issues section in the bitbucket evil repository seems to
have been removed when the evil package was migrated to github.

It means that the bitbucket url to the file: evil-states.el,
is eventually going to become outdated and possibly removed.

And the bitbucket issue url now redirects to the bitbucket sign
up page.

Therefore both urls were updated to point to the equivalent
urls in the github evil repository.
2017-03-10 13:10:33 +02:00
bmag 165b4b425f Refactor transparency functions 2017-03-03 18:14:35 +02:00
Adam Basfop Cavendish a7b0fc0485 Add enable/disable transparency functions
Add spacemacs/enable-transparency and spacemacs/disable-transparency.

For anyone who'd like to enable transparency at startup, just write '(spacemacs/enable-transparency)' to .spacemacs, and it'll work fine.

Fix spacemacs/increase-transparency and spacemacs/decrease-transparency
2017-03-03 18:14:03 +02:00
Igor Avdeev 750563961f Fix spacemacs/rename-current-buffer-file on non-file buffers.
fix issue #8415
2017-03-02 09:31:44 +02:00
Ben Gamari 7ce71c711f Add Buffer-menu-mode to global-auto-revert-ignore-modes
Fixes #7661.
2017-02-28 19:01:36 -05: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 4ab741b1da Fix error global-linum-mode-check-buffers wrong type error
Check dotspacemacs-line-numbers type before getting any keyword value.
Fixes #8318
2017-02-06 08:56:16 -05:00
syl20bnr 3f38ab0a51 line-numbers: fix spacemacs/enable-line-numbers-p
Fix the condition by moving the check for file size.
2017-02-05 23:49:17 -05:00
syl20bnr d5d80eb1a1 line-number: fix backward compatibility
There was an error in `linum-on` when `dotspacemacs-line-numbers` was set to
`'relative`.

- new function `spacemacs//linum-backward-compabitility` to test for old
supported values.
- Use an :around advice for `linum-on` instead of redefining it.
- move linum init time config to `:init` section of `use-package`
- fix relative linum initialization by testing if `dotspacemacs-line-numbers` is
  a list first.
2017-02-05 13:50:50 -05:00
syl20bnr ddfb996b20 line number: broke enable-p condition into functions
Also remove the docstring about SPC h SPC as it is already implied for the other
options in the dotfile.

Note that this commit modifies one condition, namely disabled mode condition.
It removes the first test:

    (not (spacemacs/mplist-get dotspacemacs-line-numbers :enabled-for-modes))

as it is not necessary since we have a `or` in the enable-p condition. Disabled
modes will be checked only if the current major mode is not explicitly enabled
(as intented).
2017-02-05 13:10:30 -05:00
deb0ch a28e17c4d3 line numbers: finer configuration of line numbers activation 2017-02-05 12:47:19 -05:00
syl20bnr ae9a088d19 core: Fix typo 2017-02-05 12:28:03 -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
d12frosted 1a5579db6f
unify transient states
- use `..` for listing
- use 2 spaces between groups
- use 1 space between key binding and action
2017-01-31 18:27:01 +02:00
duianto 640efb8562
Update buffer transient state formatting
Changed the buffer transient states formatting so that it matches
most of the other transient states.

Frontend
Reduced spacing:
- Between the keys and descriptions, from 2 to 1.
- Between both columns, from 4 to 2.

Backend
The first column didn't need the last two "^" (caret) characters.
Changed the last line so that "^^^^" starts below the first column.
2017-01-31 18:27:00 +02:00
duianto e89285dd67
Update window manipulation transient state formatting
Update the formatting of the SPC w .  window manipulation
transient state panel.

Select column
Change "[0-9] window N", to "[0..9] window 0..9",
so that it matches the SPC "0..9 -> window 0..9" and
SPC b "1..9 -> buffer to window 1..9" combined entries.

Split column
Add "i" to the end of "vert", then it'll have the same number
of characters as "horiz", and the text will be aligned.

Resize column
Shorten "horizontally" and "vertically" to "horiz" and "verti",
it reduces the panels width slightly.

Other column
Shorten the horizontal line below the title, so that it matches
the longest key description.

Move [q] quit to the bottom of the column.

All columns
Equalize the horizontal spacing between the columns,
from: 2, 2, 3, 3, to 2 between all columns.
2017-01-31 18:27:00 +02:00
syl20bnr 9ac779a2e4 core: import spacemacs-theme into libs
Distribute spacemacs-theme with Spacemacs so we don't need to download the
package of the theme at startup. It was delaying the display of the home buffer.

Now Spacemacs fallback to spacemacs-dark theme if the user theme cannot be
applied. Spacemacs then tries to install and reapply the user theme. If
successful, at the subsequent startups the user theme is applied right away
instead of spacemacs-dark. If the installation failed then we display a warning
informing the user and suggesting some actions.

There is now no package left to be installed manually at the start of Spacemacs.
2017-01-25 00:30:31 -05:00
syl20bnr a00179c13f Improve spacemacs/count-word-analysis
Also display overview information using regular count-words function.
2017-01-19 17:16:56 -05:00
bmag d2168806b6 sort-lines-by-column-reverse: fix wrong call 2017-01-14 22:15:11 +02:00
deb0ch dc36181cba fix window-manipulation and buffer transient states for winum 2017-01-14 17:18:29 +02:00
Somelauw aed1594548 Add more bindings to scroll-transient-state
Move scroll bindings to SPC N
2017-01-14 17:08:57 +02:00
duianto e144fde0de update uniquify-lines, uniquify a block selection
An active evil-visual-block selection, uniquified the whole buffer, this
checks either region-active-p or evil-visual-state-p, now it sorts the
selected lines.

The comment was also updated with "a" before "region" and "the" before
"current buffer".
2017-01-14 16:53:05 +02:00
duianto 04ded77199 add sort-lines-by-column, -reverse funcs and keys 2017-01-14 16:52:44 +02:00
duianto e14c29e1df add sort-lines arg, reverse func and key binding 2017-01-14 16:51:54 +02:00
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
deb0ch ae81e00db6
use winum.el for window numbers
winum.el is an heavily extended and partly rewritten version of
window-numbering.el.

Among other things it allows window numbers to be shared across frames,
thus improving multi-screen user experience.
2017-01-04 19:33:13 +02:00
Nir Friedman daa1e33f55
Add binding for jump to def'n other window 2017-01-04 19:30:58 +02:00
deb0ch 04c632939a
harmonize switch-to-scratch-buffer and switch-to-messages-buffer 2017-01-04 19:28:38 +02:00
deb0ch 352c76ca72
switch-to-scratch-buffer with prefix arg opens in other window 2017-01-04 19:28:33 +02:00
Nir Friedman 946f14e0d3
Overhaul buffer transient state
- add new bindings to move and swap buffers, and switch active window,
   by number
 - change kill buffer shortcut to d for consistency
 - Change docs appropriately
2016-12-28 21:56:18 +02:00
duianto 7021490b61
update select-current-block, reduce code
Removed the variable p2, it was defined and assigned, but never used.
Removed two progn expressions that wasn't needed.

Implemented bmag's suggestions:
Changed "if" to "when", and removed a superflous p1 assignment.
2016-12-27 09:52:24 +02:00
Adel Qalieh 8e7fe6e1f2
Add keybinding for spacemacs/alternate-window
spacemacs/alternate-window was suggested to switch between the last selected
window, or the window-analog of SPC TAB (spacemacs/alternate-buffer). This is
part of a larger family of functions, such as spacemacs/jump-to-last-layout on
SPC l TAB and eyebrowse-last-window-config on SPC l w TAB.

Resolves #7845
2016-12-27 09:50:10 +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
Liu Xiang 8a68ae1d80 Use raw prefix argument instead numeric prefix argument 2016-12-24 20:54:42 +02:00
d12frosted 3e60792136
ivy delete file with confirmation 2016-12-22 15:53:28 +02:00
duianto b3abf4269d
add function comment, evil goto next line indent
`spacemacs/evil-goto-next-line-and-indent` doesn't have a function comment, this corrects that.
2016-12-18 11:45:02 +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 a1516a6003 Fix SPC b C-d and SPC b C-D conflict
Fixes #7814
2016-11-23 16:44:13 -05:00
syl20bnr e699f1816a core: wrap Emacs custom in a dotfile new function
New function `dotspacmacs/emacs-custom-settings` wrapping Emacs
custom settings sexps.
`dotspacemacs/emacs-custom-settings` is called just after the user
configuration (`dotspacemacs/user-config`)

Customize cannot write its auto-generated sexps inside a function, to
accomplish this we trick Emacs by setting the custom file to a file
in `.cache` directory, the path to this file is defined by the variable
`spacemacs--custom-file`. At the startup of Emacs we read this file
to insert its content inside the function
`dotspacemacs/emacs-custom-settings` in the dotfile, this is done in the
function `spacemacs/write-custom-settings-to-dotfile`.

I don't think we need to write the custom settings to the dotfile when
exiting Emacs as well, since we do it at startup at the very beginning
(i.e. before actually loading the dotfile) we should be OK.

Fixes #5170
2016-11-22 22:55:36 -05:00
Cadel Watson 0f01b0fb59 Change default fringe color for centered-buffer-mode.
The current default color is "black", which creates ugly bars for many
themes on both sides of the centered buffer. This change sets the fringe
color to the buffer's background color, which blends in nicely.
2016-11-22 20:41:45 -05:00
syl20bnr 1cd8c9caf1 Revert "Restore normal state map on evilified exit"
This reverts commit 25a519ecca.

Due to regressions, we need to find another fix for the original issue.
2016-11-22 08:30:20 -05:00
Eivind Fonn 25a519ecca Restore normal state map on evilified exit 2016-11-20 18:55:54 -05:00
syl20bnr 237b2a7373 Move SPC b m to kill other buffers to SPC b C-d
Also move `SPC b C-d` to kill other buffer with regexp to `SPC b C-D`
Update Documentation accordingly.
2016-11-20 13:27:16 -05:00
Max Willsey cce6ad3a59 Change SPC b m to switch to the messages buffer. 2016-11-20 13:27:16 -05:00
Francesc Elies Henar fea919c479 compilation-mode: maps gf to find-file-at-point 2016-11-15 09:26:22 +02:00
bmag 0d4a8a4d49 Emit error if can't toggle window layout 2016-11-15 09:26:22 +02:00