Commit Graph

78 Commits

Author SHA1 Message Date
duianto 4dc1d7640a [defaults] Add dotspacemacs-scroll-bar-while-scrolling 2021-04-08 21:09:54 +00:00
syl20bnr 811001a48c [defaults] Show scroll bar when using the mouse wheel
Thanks to duianto
2021-04-08 21:08:35 +00:00
syl20bnr e6e58c54d6 [defaults] Add SPC f e I to open Emacs early-init.el file 2021-04-08 20:12:51 +00:00
Lucius Hu 55eda227c3 spacemacs-defaults: refactor
- Replaced `(when (not foo) bar)` with `(unless foo bar)`
2021-04-04 12:48:21 +02:00
syl20bnr 97cd83e169 Apply GPLv3 terms explicitly to all elisp files 2021-03-25 22:59:32 -04:00
syl20bnr d55a9e2e67 Update header for year 2021 2021-03-25 22:59:32 -04:00
duianto 60ad8194d7 Refactor spacemacs/rename-current-buffer-file 2021-02-07 21:21:41 +01:00
duianto e8c84d4b37 [base] Fix void dired-mode-map
problem:
the attempt to hide the dired buffer, which-key entry:
r -> evil-mc

caused a void dired-mode-map message to appear on startup,
in the spacemacs-base distribution.

solution:
hide the which-key entry after dired loads.
2021-02-04 19:50:54 +01:00
duianto ec57b21a92 Fix which-key entries: gr and gs in dired and magit
problem:
pressing g shows the which-key entry:
r -> evil-mc

but it calls the expected commands:
revert-buffer (in dired)
magit-refresh

s -> evil-easymotion
but it calls the expected command:
magit-jump-to-staged

solution:
removing the gr and gs which-key entries,
shows the expected commands.
2021-01-30 11:59:18 +01:00
duianto 92796dc121 [dotfile] new var: dotspacemacs-show-trailing-whitespace
Moved the function definitions for:
spacemacs//trailing-whitespace
spacemacs//set-whitespace-style-for-diff

from: spacemacs-default/packages.el
to:   spacemacs-default/funcs.el
2021-01-24 21:54:40 +01:00
duianto 61ff12cbfc [base] Show a winum required message
problem:
key bindings that use the winum package,
don't work in the spacemacs-base distribution.

for example in the buffer transient state: SPC b .
{number}, C-{number} or M-{number}

shows messages like these:
Wrong type argument: commandp, winum-select-window-1
Symbol’s function definition is void: winum-get-window-by-number

cause:
the winum package is loaded in the spacemacs-navigation layer,
but the layer isn't used in the spacemacs-base distribution.

solution:
show the message:
This command requires the winum package,
winum is part of the spacemacs-navigation layer.
2021-01-09 08:40:32 +01:00
duianto 8128774090 Handle buffer move/select/swap to last win nr +1 in all frames 2020-11-19 12:36:07 +01:00
Keith Pinson 61fc17c6ee [core] clear search highlights on narrow to indirect buffer
This avoids more problems found by @duianto.

Also:
* Use more descriptive variable names
* Print message explaining lack of narrowing in visual block mode
2020-10-31 09:15:12 +01:00
Keith Pinson 82974b454e [core] fix visual modes for narrow to indirect buffer
* Apply @duianto's fix to only activate visual selection it if it was active
  previous to the creation of the indirect buffer
* Block use of visual block mode because of continuing problems in that mode,
  and its questionable usefulness in this case
* Extract commonalities out of the narrowing functions
* Make the new keybindings into a list in the changelog for readability, per
  @duianto
2020-10-31 08:57:46 +01:00
Keith Pinson 5b4b6af8d3 [core] fix narrow to indirect buffer from visual mode 2020-10-31 08:57:46 +01:00
Keith Pinson 603d7fbe0b [core] provide keybindings for using narrow with an indirect buffer
This is useful if you want multiple narrowing in the same base buffer.

Fixes #12550 with proposed bindings by @duianto.
2020-10-31 08:57:46 +01:00
Ray Wang 905d4392c5
Add `spacemacs-scratch-mode-hook`
Also run-hooks in spacemacs/switch-to-scratch-buffer

update CHANGELOG.develop and retrigger workflow
2020-10-23 18:34:25 +02:00
duianto 0f65b000da
Handle buffer move/select/swap to last win nr +1 (#14015)
problem:
The following error messages are shown.

When trying to move, select or swap the current buffer,
to a window nr greater than the total number of open windows.

For example:
With only one window open.
`SPC b 2`
>ad-Advice-select-window: Wrong type argument: window-live-p, nil

In the Buffer Transient State (`SPC b .`):
- `C-2` (`spacemacs/buffer-transient-state/winum-select-window-2`)
>Wrong type argument: window-valid-p, #<window 12>

- `2` (`spacemacs/buffer-transient-state/move-buffer-window-no-follow-2`)
>Wrong type argument: window-live-p, #<window 14>

- `M-2` (`spacemacs/buffer-transient-state/swap-buffer-window-no-follow-2`)
>Wrong type argument: stringp, nil

Solution:
Show a descriptive message, if the target window nr is greater than the number
of open windows. And ignore the LV buffer (hydra).
2020-10-10 22:48:38 +02:00
Maximilian Wolff 8dabfcd6c3
Revise evilification of Custom-mode
Load the respective package only if
vim or hybrid mode is used.

Format the source files and update
copy right header.
2020-09-16 21:26:27 +02:00
Keith Pinson 68debde4a2
[core] evilify Custom-mode if dotspacemacs-editing-style is 'vim
This has been requested many times but never implemented.

Fixes #6699
Fixes #5668
Fixes #7583
Fixes #13309
2020-09-16 21:16:23 +02:00
Maximilian Wolff 0284f80375
Revert "improves find-user-init-file"
This reverts commit c8b3e46ef8.

This change had negative side effects and
was therefore reverted. Please see #13933
for details.
2020-09-14 20:07:05 +02:00
Ag Ibragimov c8b3e46ef8 improves find-user-init-file
<SPC f e i> should work with Emacs profile switcher plexus/chemacs
2020-09-04 22:43:16 +02:00
Ivan Yonchovski 7a107e65d2
Make spacemacs/useful-buffer-p much faster
- `with-current-buffer` triggers a lot of hooks.
2020-07-05 22:28:47 +02:00
Hans Jang 397b21e4f1
Replace close-compilation-window with show-hide-compilation-window 2020-04-16 23:22:24 +02:00
Ivan Yonchovski fb870e84a5 [defaults] Added shortcut to switch to last compilation buffer 2020-04-16 21:54:53 +02:00
Ivan Yonchovski 9f75a65398 [defaults] Add function+shortcut for copy buffer name 2020-04-16 21:32:25 +02:00
bb2020 e5e3617bdd
add `spacemacs/kill-back-to-indentation` 2020-03-08 11:51:18 +01:00
syl20bnr 101c920dbc
Add key bindings to randomize word and lines in region 2020-01-20 11:26:14 -05:00
Ilia Kurenkov 629d8bd126 Fix docstring typo 2019-12-24 10:36:24 +01:00
Nikita Leshenko aaa11a6823 Convert `case' to `cl-case' to fix cl-lib related errors
Broken since PR #13059
2019-12-18 12:08:05 +01:00
duianto b59f8a3117 Update spacemacs/new-empty-buffer docstring
Removed the parentheses around the buffer name number,
because the angle brackets are enough.

Added the frame argument.

Rewrote the accepted SPLIT arguments as a table.
2019-11-25 10:24:01 +01:00
Carlos Ibáñez b5727f7799 Fix sudo-edit on TRAMP
The indentation was changed in the second tramp-make-tramp-file-name for
consistency with the first tramp-make-tramp-file-name.
2019-11-18 15:32:25 +01:00
Seong Yong-ju 777d685c46 Fix spacemacs/kill-other-buffers to kill only buffers in the persp 2019-11-17 18:20:12 +01:00
duianto 7af300a225 Add visual line navigation keys, up and down
up   evil-previous-visual-line
down evil-next-visual-line
2019-11-03 22:44:27 +01:00
duianto 38752beffa Descriptive rename function file variables
problem:
the variable names: `dir`, `name`, and `filename` leads to confusion if they are
the old or new names

solution:
add the prefix `old-` to match `new-`,
use (`old-` `new-`) + `short-name` for just the `file.ext` (the `short-` idea
came from the `spacemacs/rename-file` function that's defined above this one),
and `old-full-path` instead of `old-filename` makes it clear that it's not just
the files name and extension.
2019-11-03 22:05:14 +01:00
duianto 4c728f041a Update file renaming, handle same new and old name
problem:
renaming a file to it's current name, results in the message:
"File 'current-name' successfully renamed to 'current-name'"

solution:
when the new and old names are the same, show a rename failed message, and call
the rename function again
2019-11-03 21:03:10 +01:00
duianto 8fbdd61e1e Update renaming, move and/or rename messages
problem:
the rename command shows the same message:
"File 'old-file-name' successfully renamed to 'new-file-name'"
(without the directory path) for all three file operations:
move, rename and both move & rename

solution:
show messages that fit the rename operation,
and align the from and to path/file names,
to make it easier to see what changed.

And use the same message format when renaming a buffer.
2019-11-03 20:40:56 +01:00
Matt Kramer e4c8cef412 Add toggle visual-line-navigation-globally 2019-10-29 18:19:05 +01:00
Hong Xu 301d867aff tags-table-mode should be in spacemacs-large-file-modes-list
It is light-weight and it is common that tags are large.
2019-10-19 00:20:21 +02:00
Miciah Masters 97ba556142 Various documentation copy-edits
Follow up the changes in the previous commit with some minor improvements
to formatting, grammar, spelling, and wording.

* layers/+distributions/spacemacs-docker/README.org: Replace "+" with
"and".
* layers/+email/mu4e/README.org: Use full sentences in the comments in the
mu4e-alert example.
* layers/+intl/japanese/README.org: Use verbatim markers for names of
files, functions, packages, and variables.  Capitalize "Linux".
* layers/+os/osx/README.org: Capitalize "Emacs", "Vim", and "Evil".
* layers/+os/osx/config.el (osx-command-as, osx-use-dictionary-app):
* layers/+os/osx/keybindings.el (spacemacs/system-is-mac): Improve
docstrings.
* layers/+readers/dash/README.org: Capitalize "API", "Helm", and "Ivy".
* layers/+spacemacs/spacemacs-defaults/config.el
(delete-by-moving-to-trash): Use full sentences in comment.
* layers/+spacemacs/spacemacs-defaults/funcs.el
(spacemacs/toggle-frame-fullscreen-non-native): Improve docstrings.
2019-10-13 12:04:59 +02:00
Miciah Masters 552fd5953c Update references to macOS
Apple renamed "Mac OS X" to "OS X" in 2012 and then to "macOS" in 2016.
Update references to use the current name.
2019-10-13 12:04:40 +02:00
duianto 556433f95c Limit lines to 80 chars
And fix comment indentation. Vertically aligned comments in function
definitions, indents them in the help buffer.
2019-09-17 20:36:30 +02:00
duianto 3521d7a11e Switch recreated messages buffer to evil-normal-state
If the messages buffer is deleted.
When it's recreated, then it opens in evil-evilified-state
where the evil keys `w` and `b` are undefined.
2019-08-19 20:48:41 +02:00
Troy Pracy 3c67ba94f3 Add docstring to align-repeat-x commands
Update 'spacemacs|create-align-repeat-x macro to add a docstring to created
functions. The docstring refers the user to the macro, providing a link to
the source code.
2019-08-19 18:11:29 +02:00
bb2020 8ed7e5e7a1 Add `spacemacs/iwb-region-or-buffer'. 2019-08-11 20:15:40 +02:00
Brandon T. Willard 2cfcf54458 Use return value from advised function in yank-indent-region
Closes #12479.
2019-06-28 12:08:49 +02:00
jcaw d4cca74854 Add support for visual line numbers
Emacs 26 added built-in support for line numbers, relative line numbers, and
visual line numbers. Spacemacs supports only absolute and relative, but there is
no way to access the visual mode. It's hard to get around this, since Spacemacs
abstracts line numbers to a reasonably high degree.

Arguably, `visual` is much more useful than `relative` as a display type. Visual
line numbers are like relative line numbers, but only lines that are actually
showing are counted. This means:

  1. Hidden lines are not counted. If a large amount of text is folded, the line
     numbers won't jump from "10" to "546". This is particularly useful in
     buffers like `magit-status`, where a large amount of information is folded
     by default.

  2. Lines that are wrapped are counted as multiple lines, since they're being
     displayed as multiple lines in the editor. Each visual line will be
     numbered - unlike `relative`, where the entire thing is numbered... Once.

With standard relative line numbers, you can't actually navigate using the line
numbers in the sidebar as soon as folded or wrapped lines are introduced. Since
this is one of the main use cases for relative line numbers, this is a big
problem.

Visual mode fixes that problem. Every line that's being displayed is labelled.
Numbers always correspond to the actual number of lines you'd need to navigate
to reach that line.

This commit extends Spacemacs' line number interface to provide visual line
number support.
2019-06-23 19:16:44 +02:00
duianto de2297b2e1 Fix copied dir not in minibuffer, clipboard disabled
Fixed the minibuffer showing: `nil`
when `select-enable-clipboard` is `nil` and the current files
path/dir/file/line/column/etc. is copied with the keys under
the prefix: `SPC f y`
2019-06-17 09:20:01 +02:00
Juha Jeronen 672e3db625 Customizable major-mode for new empty buffers
New var: dotspacemacs-new-empty-buffer-major-mode

Set to a symbol naming a mode (e.g. 'text-mode) to apply that major mode to any
buffers newly created in Spacemacs by spacemacs/new-empty-buffer.

Fixes #12382.
2019-06-17 08:26:56 +02:00
Alexander Miller 2e14b4a88c Don't use large file check in buffers already in fundamental-mode.
This change will prevent unnecessary requests to literally open files that are
literal already (like elfeed's index file).
2019-06-13 15:05:34 +02:00