Commit Graph

94 Commits

Author SHA1 Message Date
Lucius Hu 7d60d894a7
updated COPYRIGHT 2022-08-05 04:10:26 -04:00
Arif Er 00f9ab19ac chore: update copyright headers to 2022
The script used to identify and update the change is added into the GitHub
workflows script directory. A workflow action can be created to trigger the
script to update the headers on the first of every new year. Possibly a task for
a consequent PR.
2022-06-03 17:32:20 +02:00
iliekprogrammar c0948b3e04
[defaults] Fix toggle line numbers to respect dotspacemacs-line-numbers.
Previously, `SPC t n n` (spacemacs/toggle-line-numbers) did not respect
dotspacemacs-line-numbers despite it telling otherwise, when it's binded to a
property list.
2022-05-29 16:05:15 +02:00
thanhvg 35bfa8601a
[layout] consittent buffer list (#15520)
* [spacemacs-defaults] make split double windows consistent

* [layout] new macro spacemacs||with-persp-buffer-list

to use instead of `with-persp-buffer-list`. The new repsects the order of
original buffer-list

* [default] improve split-triple|grid windows functions

buffer-list will return the list int the the most recent accessed order. Of
which the first one is always the current buffer. So we don't need to do extra
work in removing it.
2022-05-21 09:21:40 +02:00
Dan Kessler 83d687534c tidy read syntax for anonymous functions
First, change read syntax for anonymous functions currently written '(lambda to
instead just be (lambda; otherwise this raises a warning.

Next, while we're at it, change all instances of #'(lambda to just (lambda,
since the two are equivalent and the latter is more concise (excepting anything
in core/libs or in /local/ subdirs of layers)

https://www.gnu.org/software/emacs/manual/html_node/elisp/Anonymous-Functions.html#index-_0023_0027-syntax
2022-05-11 19:24:54 +02:00
Lucius Hu e24e1e4b57
spacemacs-defaults: Prompt to save a buffer for certain operations (#15331) 2022-02-12 04:09:53 +00:00
Lucius Hu 696b15652f
Revert "spacemacs-defaults: Added prompt to save a buffer (#15297)" (#15330)
This reverts commit d33a1a8fcc.
2022-02-09 12:29:46 -05:00
Lucius Hu d33a1a8fcc
spacemacs-defaults: Added prompt to save a buffer (#15297)
Added a new `kill-buffer-hook` that prompt the user to save a buffer
before killing it.
2022-02-09 03:33:21 -05:00
Daniel Nicolai cabe650f00
Extend spacemacs/copy-file command with extra actions (#14754) 2021-09-15 18:58:14 +00:00
Aaron L. Zeng 1a9ebf42df Fix file rename target path when buffer name is uniquified
When the buffer's name is uniquified (because multiple buffers have
the same short name), it is no longer equal to the basename of the
buffer's file name, so it is incorrect to use the buffer name in the
rename operation.
2021-08-22 19:56:17 +02:00
Keith Pinson b2a18301fa [defaults] Disable line numbers with `SPC t n n`
Toggles are great and all, but the trouble with the various toggles for line
numbers is that they force you to remember and think about the fact that there
are variant forms of line numbers. To beginners or forgetful people the various
combinations of behavior can be unintuitive here (e.g. toggling off relative
line numbers does nothing if you are actual in visual line numbers mode). Though
it doesn't fit exactly into the normal stuff we have for toggles, due to the
complexity of this situation I think it is good to just have a way to say "line
numbers be gone!"

Wasn't sure what keybinding to use, so used a double-tap mnemonic.

If this PR gets rejected, there are a couple minor fixes that should probably be
pulled out and submitted separately.
2021-07-30 16:57:27 +02:00
Daniel Nicolai 295e4271ef Fix wrong buffer name after file rename
When providing only the new directory path (i.e. without new filename) while
moving a file to a new directory with `spacemacs/rename-current-buffer-file`,
currently Spacemacs opens the file in a new buffer with the directory name.

Additionally, the `file-renamed-p` gets set the wrong value. To fix both
issues (with minimal work), it is easiest to just fix the `new-name`
value (alternatively fixing the `rename-buffer` and `set-visited-file-name`
forms later would not fix the wrong `file-renamed-p` value issue).

Finally when called with a universal-argument, then that argument
unintentionally gets 'passed' in the interactive call to
projectile-invalidate-cache. So this PR fixes that by changing the interactive
call to a funcall.
2021-07-29 20:54:30 +02:00
duianto cf21402c5c Revert "Fix which-key entries: gr and gs in dired and magit"
This reverts commit ec57b21a92.

A which-key change caused issues with this fix.
And the fix doesn't seem to be needed anymore.

The correct which-key entries appear without the fix.
2021-06-23 17:33:36 +02:00
Maximilian Wolff f213b8cf20 Revert "[spacemacs-defaults] Move new function to correct file"
This reverts commit 1169eb3709.
2021-05-07 05:29:03 +00:00
Maximilian Wolff 1169eb3709
[spacemacs-defaults] Move new function to correct file 2021-05-04 22:06:34 +02:00
Thanh Vuong 056eb6b91b
[defaults] add qickrun
bind it to `SPC x x`, not sure it's the right place but it's easy to invoke
2021-04-19 22:08:47 +02:00
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