Commit graph

85 commits

Author SHA1 Message Date
Maximilian Wolff
25d6364bdb
[version control] Revise git-gutter+ refresh on Magit refresh
It was possible before, that the utility function
`spacemacs//git-gutter+-refresh-in-all-buffers`
was not defined but called in the package file.
2020-09-23 21:42:46 +02:00
ClarityStorm
497c23a0f1
Fix git-gutter+ refresh on Magit refresh (#13958) 2020-09-23 21:40:45 +02:00
Robert O'Connor
82ba73a1c0
update copyright to 2020 2020-09-23 21:25:01 +02:00
Maximilian Wolff
9fd1f89867
Revert Fix git-gutter+ refresh on Magit refresh
this is causing errors in magit after staging a new
file and making a new commit.
2020-09-18 20:54:06 +02:00
Maximilian Wolff
1f869031ab
Replace lambda with named function in gitter refresh fix
Hooks should not include anonymous functions therefore
I have replaced it with a named function.

https://github.com/bbatsov/emacs-lisp-style-guide
2020-09-18 20:22:27 +02:00
ClarityStorm
c23b17833c
Fix git-gutter+ refresh on Magit refresh 2020-09-18 20:15:23 +02:00
Codruț Constantin Gușoi
18bd126de4 Change browse-at-remote to "SPC go" sicne it is not github specific 2020-07-18 09:37:11 +02:00
duianto
4e2ce45aa4 [version-control] Bind SPC g v I (vc-ignore) on startup 2020-05-10 21:18:35 +02:00
duianto
57b1ae7880 [version-control] Load SPC g v keys on startup 2020-05-08 22:27:11 +02:00
madand
081d8f29d4 [version-control] Use :toggle to avoid installation of unused packages
Usage of the `:if` keyword with `use-package` does not prevent Spacemacs form
installing the package, it only prevents the loading in run-time. This commit
employs the `:toggle` feature of the configuration layer system to prevent the
unneeded packages from being installed in the first place.

This further improves upon 31324f68bb
2019-12-27 17:39:51 +01:00
Miciah Masters
ec0a535b27 Show conflicts in smerge ts hint
Use a dynamic hint for the smerge transient state in order to show the
current and total numbers of conflicts, and make the full hint toggleable.

* CHANGELOG.develop: Add an entry for this change.
* layers/+source-control/version-control/config.el
(spacemacs--smerge-ts-full-hint-toggle): New variable.
* layers/+source-control/version-control/funcs.el
(spacemacs//smerge-ts-hint): New function.  Return a string indicating the
index of the current conflict and the total number of conflicts detected by
smerge-mode.  If spacemacs--smerge-ts-full-hint-toggle is true, append the
smerge transient state's full hint.
(spacemacs//smerge-ts-toggle-hint): Toggle showing the full hint for the
smerge transient state.
* layers/+source-control/version-control/packages.el
(version-control/init-smerge-mode): Define the transient state in :init so
we can use spacemacs|transient-state-format-hint.  Use
spacemacs//smerge-ts-hint to display a dynamic hint.  Bind the ? key to
spacemacs//smerge-ts-toggle-hint.
2019-10-13 10:09:42 +02:00
emacspace
c7c348a676 documentation formatting: Sun May 26 20:58:52 UTC 2019 2019-05-27 01:23:35 +03:00
Anton-Latukha
f6660f82d4
Switch to the new layers generator 2019-05-15 21:08:21 +03:00
JAremko
5d02b1c4bb Add more tags 2019-05-03 03:44:19 +03:00
emacspace
1b87247bf4 documentation formatting: Sun Apr 21 11:40:05 UTC 2019 2019-04-21 22:04:17 +03:00
duianto
4a8c59a146 [version-control] update readme
Unify "Key binding" headers.
Capitalize first word in descriptions.

Smerge transient state section:
Group by column/category.
Merge previous hunk bindings to one line.
Remove Smerge prefix in descriptions.

New Smerge transient state key bindings:
Merge action section:
Kill current

Diff section:
Diff base and mine
Diff mine and other
Diff base and other
Ediff
2019-04-21 11:48:48 +02:00
duianto
0ff31edcd8 [version-control] Smerge one char diff bindings
Reduce the Smerge transient state diff bindings from two to one character:
=< to <
== to =
=> to >
2019-04-21 11:48:48 +02:00
duianto
b238516d1f [version-control] smerge add 2 keys, etc.
Added key bindings:
`e` `smerge-ediff` to diff column
`K` `smerge-kill-current` to merge action column,
(used upper case K, because lower case k moves the cursor to the previous line)

Renamed "join curr/next hunk" to "Combine curr/next hunks", to match it's
command name: `smerge-combine-with-next`
and moved it from the "Merge Action" column to the "Other" column. Because the
merge action column handles versions while the combine command acts on hunks.

Sorted and groupped the backend keys to match the transient state columns.
2019-04-20 20:50:45 +02:00
duianto
677c06c759 [version-control] Smerge TS formatting
Capitalize title and column headers.

Reduce two to one space between the key and description in the first column.
Rename and separate "move up/down" to "next line" and "prev line", to reduce the
first columns width, and to make it clear that it doesn't move the hunks.

Reduce four to two spaces between the first and second columns.

Rename "combine with next" to "join curr/next hunk" to indicate that the
hunks/conflicts are combined and not just of the versions.

Add a new column: Diff
Remove "diff" and "to" from diff key descriptions, to reduce the column width.
Move refine from the Other column to the new Diff column.
2019-04-20 13:00:05 +02:00
Wang
b21a7da680 Extend smerge transient-state with diff keybindings
I often use these operations to ask how mine and other have diverged:

=< smerge-diff-base-mine
== smerge-diff-mine-other
=> smerge-diff-base-other

It's awkward to use their global keybindings under C-c ^ because that exits the
smerge transient-state.

Judging from issue GH-7378 there was no principled reason to omit them, only
that the author did not use them himself.
2019-04-20 10:02:23 +02:00
yuhan0
4696c5306a [vcs] Inhibit auto-indentation after reverting hunks
Fixes #11523, makes it easier to revert changes to non-standard indentation when
aggressive-indent mode is enabled.
2019-04-18 23:16:08 +02:00
bmag
99b355e2fa Adapt for Magit's move to Transient
Magit now uses Transient instead of magit-popup, and we must adapt. Also had to
replace the recently removed magit-diff-buffer-file-popup with
magit-diff-buffer-file (similar but doesn't offer a popup before displaying the
diff).

Note some upstream packages haven't adapted to this change, but when they do we
might need similar fixes:
- magithub
- magit-gitflow
- magit-svn
2019-02-16 10:21:45 -05:00
Voleking
a8567cbed3 Fix diff-hl-highlight function is set to nil 2019-01-20 17:12:53 +02:00
emacspace
45276bd96f documentation formatting: Wed Dec 5 03:03:03 UTC 2018 2018-12-04 22:06:14 -05:00
emacspace
4912b54f24 documentation formatting: Mon Nov 12 22:12:39 UTC 2018 2018-11-12 22:24:27 +00:00
yuhan0
0596e90c3d Add 'z' recenter bindings for various transient states
By analogy with the "zz", "zb", "zt" vim / evil bindings, this adds an
additional key binding "z" for `recenter-top-bottom` to the following
transient states which navigate around the buffer in large jumps:
- auto-symbol-highlight
- error
- buffer
- vcs
- org-babel

This allows for repositioning of the buffer for visibility without having to
exit the transient state.

Minor updates are also made to documentation of other transient states.
2018-11-12 21:47:17 +00:00
JAremko
cd39f80c24 Reformat documentation 2018-10-11 00:13:43 +03:00
syl20bnr
666671a881 Sort key bindings alphabetically in version-control README.org 2018-06-24 02:54:07 -04:00
Masayuki Takemura
ce6e28601f diff-mode: define key bindings with leader key for vim editing style
This patch defines key bindings with leader key instead of evilified state to
make it easier for people those who edit in vim style to use diff-mode for both
of editing and reviewing files/buffers.

There are two use cases for diff-mode:

(1) to manually edit diff in a patch file
(2) to review diff that is generated by `vc-diff' or similar commands

The evilified state is useful for the case (2), but is confusing for the
case (1). Usually, users of vim editing style expect that they are in normal
state when a new buffer is created. However, when evilified state is used for
the case (1), some keys insert their character in a buffer, which let the users
think they are in insert state and keep hitting keys to edit the buffer, while
other keys invoke commands or change contents of buffer, which let them think
they are in normal state, so finally the user get lost what state they are in if
they don't know evilified state is used for diff-mode.

The changeset 58d521af5 "Unbreak diff-mode", originally written on Apr 2 2017,
tried to avoid the confusion by removing the evilified state configuration.
However, it is overwritten by the other and older changeset 8009e1bf5 "evilify
vc-* buffers", which is written on Feb 22 2016, for some reason.

This patch respects both of the use cases listed above, thus defines key
bindings with leader key instead of just removing the evilified state
configuration.
2018-06-24 02:54:07 -04:00
syl20bnr
acfc8c5814 version-control: correctly defer diff-hl and git-gutter packages 2018-06-14 10:08:38 -04:00
syl20bnr
31324f68bb Avoid loading all the diff packages in version-control layer 2018-06-14 02:51:24 -04:00
syl20bnr
c3c7249234 Delay diff-hl loading by 5 seconds 2018-06-14 02:28:10 -04:00
syl20bnr
c41a122b24 Lazy load diff-hl 2018-06-10 23:30:48 -04:00
syl20bnr
ebe4c60264 Revert "Defer packages by default using use-package-always-defer"
This reverts commit 29c78ce841 and all other fixes
that have been made afterwards.

The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
2018-03-03 23:40:10 -05:00
syl20bnr
29c78ce841 Defer packages by default using use-package-always-defer
Warning now `:defer t` is implied, to force a package to load `:demand t` is
now necessary.
2018-02-27 23:32:52 -05:00
syl20bnr
83a6778eab Lazy load diff-hl and move lsp-ui-mode hook 2018-02-27 23:32:52 -05:00
JAremko
d2c3b847d8 doc fmt 2018-01-27 16:57:39 +02:00
denin
8009e1bf50 evilify vc-* buffers 2018-01-20 10:54:40 -05:00
syl20bnr
326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -05:00
CeleritasCelery
e32acfbf3b Fixed feature header 2017-08-29 20:00:44 +03:00
bmag
433ae7c30b git-gutter: remove redundant arg for timer 2017-08-11 23:56:24 +03:00
Aaron Jensen
d47066611b Defer git-gutter loading
As it was, git-gutter and git-gutter+ get started as soon as emacs starts if
they're enabled. This added about 500ms to startup time on my machine, so this
will instead defer it until emacs has been idle for 5 seconds.
2017-08-11 23:56: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
JAremko
6c5a0b2b14 update docs to the new toc-org format 2017-05-22 18:35:37 +03:00
Steven Allen
58d521af51 Unbreak diff-mode
diff-mode is for *editing* diffs. Defaulting to evilified state and binding j/k
breaks this.

You can still use TAB/S-TAB to navigate through hunks.
2017-05-19 16:58:01 +02:00
JAremko
c1e4556882 Format and cleanup docs. Fix links. 2017-04-28 23:29:14 -04:00
Bryan Gilbert
45a7740215 remove automatic call to linum-setup when using git-gutter 2017-04-28 22:52:24 -04:00
JAremko
c277c9716b add browse-at-remote 2017-03-30 22:15:23 -04:00
Ayush Goyal
b00096e9ef Add transient state for smerge mode 2017-03-13 19:21:57 +02:00
syl20bnr
fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00