Commit graph

80 commits

Author SHA1 Message Date
duianto 3dba3f6794 Add switch-to-help-buffer function and keybinding
`SPC b H` is available, for opening or selecting the help buffer (if it
exists). This makes it much easier to open the help buffer, than having
to open the buffer list (`SPC b b`), then typing one or more characters,
to select the help buffer, and finally pressing `RET`.
2018-01-09 23:19:57 -05:00
Ag Ibragimov f0a5c0960c Adds maximize-vertically function 2018-01-06 11:25:23 -05:00
syl20bnr 326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -05:00
Gunnar Bastkowski 857f6304c7 Add keybinding to align by percent 2017-12-23 10:54:01 -05:00
Codruț Constantin Gușoi 7d4946901b
Improves the linum text scaling advice
The first improvement consists of running the scale fix only for
graphical emacs. The scale fix is not needed in the terminal. Also some
poeple still have problems with it in the terminal even though they run
latest emacs master and spacemacs develop.

The second improvement is related to the way the margins are scaled. It
was incorrect to calculate the scale factor and apply it to the current
window margin width, it needed to be applied to the initial margin
width.
2017-08-09 12:26:16 +03:00
ZarsBranchkin efef39050b Prompt to save modified, user created buffers on quit 2017-07-06 14:39:26 +02:00
Alex Palaistras 4c57939fb3 Add SPC b u keybinding for reopening killed buffers
This is similar to the `Ctrl+Shift+T` keybinding found in major browsers, and
helps when accidentally killing a buffer (i.e. fat-fingering `SPC b d` when
meaning to press `SPC b s`).

Only buffers that resolve to existing files will be considered, and stored in a
stack which is pushed to and popped from on buffer kill.
2017-07-06 14:34:46 +02:00
JAremko 44423c18d0 Implement and bind "distraction free mode" to SPC w C 2017-07-04 11:54:24 +03: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
Eivind Fonn 4489049cc2 bugfix: margin scaling ignores window
Thanks sdwolf and Eli Zaretskii
2017-06-01 13:49:34 +02:00
Eivind Fonn 5048aff9fa Properly require tramp 2017-05-28 15:07:01 +02:00
denin 5397b6f01f Rewrite sudo-edit
Old version worked only for method 'ssh' and did not work at all if
user was not specified (e.g. /ssh:hostname:/path). Since the symbol '@' was
required in a filename.
2017-05-28 15:06:20 +02:00
ralesi a518d14c69 Fix some issues with persistent server
* frame killer logic wasn't correct when server not running
* even when debugging, we want to kill spacemacs
2017-05-24 13:42:49 +02:00
Wieland Hoffmann 63ad55b57e compilation-finish-function: Set case-fold-search to nil
The various string-match calls in this function were obviosly written with that
in mind.

This also fixes the case where the compilation buffer contains the output of
`cargo test`, which includes "0 failed". Previously, this was treated as an
error, now it's not.
2017-05-23 15:13:29 +02:00
Eivind Fonn 5c4b7e62b1 Some changes to align-repeat
- Remove echo of regexp
- Use = instead of equalp
- Use use-region-p instead of checking line numbers
- Use when/unless instead of if
- Use point-at-{eol,bol} instead of point
2017-05-23 13:05:23 +02:00
Eric Siegel 5be474f5d3 Smarter default alignment with spacemacs/align-repeat (#8309) 2017-05-23 13:00:32 +02:00
Eivind Fonn 8f7afe5eec Add prefix argument to rename-current-buffer-file
Best of both worlds. Maybe.
2017-05-23 10:55:25 +02:00
tddsg 7ecf1433ba fill the current filename as a suggestion of spacemacs/rename-current-buffer-file 2017-05-23 10:52:47 +02:00
Alexander M 113794f4e8 Keep find-ert-test-buffer from moving point. 2017-05-22 17:13:57 +02:00
duianto 122076407b rename-current-buffer-file: non-file bfr sav or ren
problem:  renaming a non-file buffer, only shows an error message
solution: ask if the buffer should be saved to a file or just renamed
2017-04-28 23:06:40 -04:00
duianto a64ec4d374 swap-buffers-to-window: symbols fun def void
problem:  target window doesn't get focus after buffer swap:
          'symbols function definition is void: select-window-by-number'
solution: missing 'winum-' before 'select-window-by-number'
2017-04-28 23:03:52 -04:00
Rostislav Svoboda 90f732c226 Count of killed matching buffers
Enables feedback messsages indication like e.g.:
    "5 buffer(s) killed"
2017-04-20 23:14:31 -04:00
bmag 4b92183cc0 new-empty-buffer: force buffer to appear in new window
Pass non-nil force-same-window argument to switch-to-buffer, so the newly
generated buffer is guaranteed to display in the newly created window.
2017-04-18 22:10:33 +03:00
syl20bnr f20ef3477d Remove redundant create-align-repeat "brackets" 2017-04-17 23:27:24 -04:00
deb0ch eb5fcd5826 also provide align functions for {, }, [ and ] under SPC x a 2017-04-17 23:19:07 -04:00
Arseny Smalyuk 23ea887107 Add asm-mode to the spacemacs-indent-sensitive-modes list 2017-04-17 22:45:34 -04:00
duianto 33acf40245 Update new-empty-buffer: split argument
Updated the `spacemacs/new-empty-buffer` function, to accept a `split`
argument, that can have 4 values: `left`, `below`, `above` or `right`.

Added new functions and key bindings (SPC b M-h, -j, -k and -l) for
each direction.
2017-04-17 21:54:06 -04:00
duianto 642c987623 Update sort-lines-by-column, improvements
Limit the lines to only get sorted when a block or rectangle
selection is active, on 2 or more lines. Otherwise show a
message stating the requirements for sorting by column.
2017-04-17 17:51:27 -04:00
Paulo Diniz 354951e37a Creates aligment for brackets 2017-04-11 23:46:05 -04:00
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
Igor Avdeev 750563961f Fix spacemacs/rename-current-buffer-file on non-file buffers.
fix issue #8415
2017-03-02 09:31:44 +02: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 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
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
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
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